Thread: Using extended memory to store program data

  1. #1
    Registered User
    Join Date
    Jan 2005
    Posts
    1

    Using extended memory to store program data

    I make C/DOS programs using an old C compiler (QuickC version 2.5) and want to store data retrieved by a program dynamically in extended memory. Memory allocation functions provided with the compiler software, e.g., malloc(), only find memory space in conventional memory. Is there a procedure to use extended memory?

    Thank you for any help.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    So is your OS really DOS, or just some window running on top of win9x/NT/2K/XP ?
    Because if you are, you seriously need a better compiler to take advantage of that.

    But if you're really stuck in real DOS, then the first thing is to check the compiler docs to see if there is any "extended malloc" API calls for allocating memory in extended memory.
    If there isn't, you'll need to read "Ralph Brown's Interrupt List" (google it). That tells you all you need to know about rummaging around in the innards of DOS and BIOS.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Program Plan
    By Programmer_P in forum C++ Programming
    Replies: 0
    Last Post: 05-11-2009, 01:42 AM
  2. Client-server system with input from separate program
    By robot-ic in forum Networking/Device Communication
    Replies: 3
    Last Post: 01-16-2009, 03:30 PM
  3. Program that displays amount of free memory
    By trancedeejay in forum Linux Programming
    Replies: 3
    Last Post: 01-13-2006, 01:27 PM
  4. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 09:54 AM
  5. Is it necessary to write a specific memory manager ?
    By Morglum in forum Game Programming
    Replies: 18
    Last Post: 07-01-2002, 01:41 PM