www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/03/28/04:30:30

Subject: Re: Go32 error when calling system() under desqview/X
To: drupp AT cs DOT washington DOT edu (Douglas Rupp)
Date: Mon, 28 Mar 1994 10:29:10 +0200 (MET DST)
From: Henrik Storner <storner AT olicom DOT dk>
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019