www.delorie.com/djgpp/v2faq/faq013.html   search  

| Previous | Up | Top |

3.10 How to get the most RAM for DJGPP programs?

Q: How do I set my system so that DJGPP programs could use all of my 256MB of installed physical RAM?

Q: I have 128MB of memory installed, but go32-v2 only reports 32MB, how can I get more?


A: You can have as much as 256MB of physical memory in DJGPP programs, provided that you have at least that much installed, and that you observe the following guidelines: Another possibility is to run your program from the Windows 9X DOS box, after changing the EMM386 line in your CONFIG.SYS like this:
      DEVICE=C:\WINDOWS\EMM386.EXE NOEMS L=131072

I'm told that this line (here for 128MB of installed memory) together with an "Auto" setting of the DPMI memory for the DOS box allows DJGPP programs to use up to 117MB of memory when running from the DOS box under Windows 9X.

If you need to use more than 256MB of physical memory, try to convince Charles Sandmann to upgrade CWSDPMI. However, note that breaking the current limit of 256MB will make CWSDPMI considerably slower (it requires to abandon 16-bit arithmetics and move to 32-bit longs, which causes Turbo C, the compiler used to build CWSDPMI, to generate much slower code). Charles says that people who got such customized versions of CWSDPMI were never really happy with its performance, so he advises to consider the 256MB limit a serious reason to switch to another operating system. For example, a dual-boot DOS/Linux system will probably do. Another possibility is to run under OS/2 which features a built-in DPMI 1.0 support which can be configured to support as much as 512MB of DPMI memory (the user who reported this didn't know how much of this can be physical RAM).


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright ⌐ 1998   by Eli Zaretskii     Updated Sep 1998  

Powered by Apache!

You can help support this site by visiting the advertisers that sponsor it! (only once each, though)