Date: Tue, 9 Sep 1997 14:17:29 +0300 (IDT) From: Eli Zaretskii To: Jari Oksanen cc: djgpp AT delorie DOT com Subject: Re: system(): program too large In-Reply-To: <3413CFF4.D38@helsinki.fi> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Mon, 8 Sep 1997, Jari Oksanen wrote: > Yes, I can. But it seems that the problem is COMMAND.COM. If I say in > the DOS prompt "COMMAND.COM /C PROBLEM.EXE", I get the very same error > message. This means that the problem is not DJGPP-specific. I can only guess that the program might indeed need a lot of conventional RAM at run time (and extra COMMAND.COM leaves less of it), otherwise I cannot imagine why "command /c" won't run it. Try to optimize your memory usage by loading TSRs and device drivers HIGH. If that doesn't help, you will need to talk to whoever wrote the program to find out what's wrong. > At least the djgpp Info pages say that system() calls > COMMAND.COM to execute the program. No, DJGPP's `system' doesn't call COMMAND.COM, and the docs explain why. But DJGPP needs some of the low memory, exactly like an extra copy of COMMAND.COM does, so what's left might not be enough for that program. > LINK /seg:140 /E /F /PACKC /STACK:4000 This requests 140 segments and 4KB of stack space. It might be a clue that the program uses a lot of memory (maybe large arrays?). > Further I know that the same program compiled with Lahey Fortran90 (with > stubbed Phar Lap memory manager) can be spawned with system() > function, Lahey Fortran produces protected-mode programs which don't need conventional memory.