Node:Windows9X alloc, Next:, Previous:Windows alloc, Up:Memory

15.6 Memory allocation peculiarities under Windows 9X

Q: I seem to be unable to get more than 16 MBytes of virtual memory under Windows 9X, even though I have 32 MBytes of RAM installed on my machine, and a lot of disk space....

A: If your machine has 64MB or less of main memory, you must set the maximum amount of DPMI memory to 65535K in the DOS box Property Sheets. Click on the Properties button of the DOS box toolbar, then click on the Memory tab, and type the number 65535 in the box under DOS Protected Mode Memory. If you leave that setting at the default "Auto", your programs are at Windows' mercy, and in many cases will get only 16 MBytes. You must actually type 65535 inside the dialog box, as checking out the values from the list Windows offers will never get you past 16384 (i.e., 16MB).

Machines that have more than 64MB of physical memory should always leave the DPMI memory setting at "Auto", since the manual setting cannot be larger than 65535K. Setting the DPMI memory property to "Auto" usually leaves the DOS box with whatever is physically installed, minus about 5MB, assuming the disk used by the Windows swap file has enough free space.

Some users report that they need to edit their EMM386 command line in the CONFIG.SYS file to say this:

 DEVICE=C:\WINDOWS\EMM386.EXE NOEMS L=131072

The L=NNN parameter (here for 128MB of installed memory) forces EMM386 to use all of the installed memory. (This should work by default with Windows 9X, but if it doesn't, try the above line.)

Note that you cannot allocate more than half the available memory in one chunk under Windows 9X, exactly as the things are under Windows 3.X, and you cannot have more than 64 MBytes of virtual memory available to DJGPP programs running on Windows, unless you have more than 64MB physical memory installed.