delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/07/23:16:08

Message-Id: <199709080314.NAA07619@rabble.uow.edu.au>
Subject: Re: system() and memory
To: eliz AT is DOT elta DOT co DOT il (Eli Zaretskii)
Date: Mon, 8 Sep 1997 13:14:30 +1000 (EST)
Cc: djgpp AT delorie DOT com (DJGPP)
In-Reply-To: <Pine.SUN.3.91.970907190828.2962D-100000@is> from Eli Zaretskii at "Sep 7, 97 07:11:43 pm"
From: *** Brett *** <bporter AT rabble DOT uow DOT edu DOT au>
MIME-Version: 1.0

> 
> 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 -


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