Node:How much memory,
Next:Confusing alloc,
Previous:Memory,
Up:Memory
Q: How much virtual memory can I use in DJGPP programs?
A: That depends on the DPMI host you are using. The latest version
r5 of CWSDPMI (the free DPMI host which comes with DJGPP) lets you use
all the available extended memory, plus the available hard disk storage
up to a total of 2GB. (Version r4 of CWSDPMI supports up to 256MB of
physical memory and up to 256MB of disk space, for a grand total of
512MB of virtual memory, but has bugs when the total memory is more than
255MB.). Try a malloc(50*1024*1024)
some day.
With other DPMI hosts, your mileage may vary. Quarterdeck's QDPMI, for
instance, has a bug in some of its versions which effectively disables
virtual memory under DJGPP (described in QDPMI VM bug, below), so you
only have whatever free physical RAM is left. On Windows 3.X, the
amount of virtual memory you get depends on various virtual memory
settings in the Control Panel and on the .pif
file settings for
the program you run (see Windows allocation subtleties, below). On
Windows 9X, the memory settings of the DOS Box Property Sheets define how
much virtual memory a DJGPP program will get (see Windows 9X allocation details, below). OS/2 reportedly can be configured to support up to 512MB
of DPMI memory.