Mail Archives: djgpp/1997/09/07/23:16:08
>
> On Mon, 8 Sep 1997, *** Brett *** wrote:
>
> > Use spawn command. It frees up _loads_ more memory for your programs.
>
> This is incorrect. `spawn' does NOT release more memory than `system',
> because in most cases `system' just calls `spawn' internally.
>
Is this just for DJGPP, or the way all compilers do it? I haven't used
system() any more because I wrote a menu program in Borland C++ with Turbo
Vision, and system() calls left you with about 230K free memory, whereas
spawn gave about 500K (in 16-bit DPMI).
I thought the difference was that spawn loaded and executed the program
directly, whereas system() calls the COMSPEC (command.com) to load the
program or execute the command.
Sorry if I misinformed everyone, but in my previous experience (admittedly
in Borland 16-bit prot. mode), this statement had been correct. In fact,
calling spwan( getenv( "COMSPEC" ),...) gave more aviable memory than
system( getenv( "COMSPEC" )).
Now I'm just plain confused :&
Could you please clear this up for me? I don't have enough time or hard
drive space to download the DJGPP source yet.
Brett
--
Brett Porter
bporter AT rabble DOT uow DOT edu DOT au
http://www.geocities.com/CollegePark/Union/3596
Humour, Programming, and more.
- Raw text -