Mail Archives: djgpp/1994/03/28/04:30:30
Douglas writes:
>
> Frequently I get an: "Error: not enough memory to run go32!" when I try
> to run something that calls system() or otherwise exec's another program.
> It only happens under desqview/X and then not all the time.
This is probably for the same reason, that make runs out of memory when
compiling under straight MS-DOS: You are running out of conventional
DOS memory in the DOS window where your program is executing. With 'make'
it is especially bad, because it needs to invoke go32 to start up gcc and
the various compiler programs (cpp, cc1, ld) which in turn leads to no less
than 3 invocations of go32 active at any time. go32 needs some 450K of
conventional memory to start with, so even though you have plenty of
memory free, you still get bitten by the 640K barrier.
If you have the source code for the programs, there is actually a fairly
neat solution to the problem, although it only works inside DESQview/X:
The DJGPP libraries that Quarterdeck has supplied has a modified
version of system(), that will spawn a program *in another session* via
a .DVP-file. You pass the name of the DVP file to system(), instead of
the name of the executable. When the system() call then executes, it
gets its own window with all of the conventional DOS memory that DV/X can
map in.
You need version 1.02 of the DV/X libraries for this to work; they are
on Simtel in the DJGPP library, e.g. oak.oakland.edu:/pub/msdos/djgpp,
file qddvx102.zip .
--
Henrik Storner | "Man is the best computer we can put aboard a space-
(storner AT olicom DOT dk) | craft ... and the only one that can be mass produced
System Engineering | with unskilled labor."
Olicom Denmark | Wernher von Braun
- Raw text -