www.delorie.com/djgpp/faq/memory/no-mem-shell.html   search  
When Make invokes gcc, it complains about ``Not enough memory to run go32''. But if I invoke gcc manually with the same command line as Make did, it runs OK. How come?

I cannot use recursive Makefiles: go32 keeps complaining about there being not enough memory. 16 MByte of RAM are not enough??!

When I compile from Demacs/OEmacs, go32 says it doesn't have enough memory, but it does succeed to run other DJGPP programs.

When one djgpp program invokes another, the memory above 1 MByte is paged out, but the conventional memory occupied by go32 itself is not freed. Therefore, each djgpp parent program leaves to its children and grand-children 130K less conventional memory. Even the most memory-optimized systems only have 635K of free conventional RAM, which means even for these cases you cannot invoke more than 4 (= 635 / 130) programs one on top of the other. When you run gcc, you must have enough conventional RAM for at least 2 instances of go32, because gcc invokes the various compiler passes (cpp, cc1, as, ld, etc.) on top of itself; the third instance is taken by make, if you invoke gcc from it, or by your emacs editor. This leaves you enough RAM for at most one more instance which can be used for another level of recursive make, or for running make from emacs, but that's all. Many systems have only enough RAM for 3 instances of go32, which means they cannot run recursive make's at all. Abundance of free extended RAM (above the 1 MByte mark) won't help here, because go32 runs in conventional memory.

Sadly, there isn't much you can do to make this problem go away. go32 can't be easily changed to give up its memory when it invokes another program, because this would break the mechanism by which it passes long command lines to subsidiary programs, and many Makefiles rely on long command lines. DJGPP v2.0 will bring us salvation (only one instance of the extender--actually, a DPMI host--will be present in memory at any given time), but until then, here is what you can do if you miss another level of go32 invocation by a small margin:


  webmaster     delorie software   privacy  
  Copyright © 1995     Updated Feb 1995