delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/09/23/19:30:16

From: Damian Yerrick <Bullcr_pd_yerrick AT hotmail DOT comRemoveBullcr_p>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Repost: free() DOESN´T return memory to the system
Organization: Pin Eight Software http://pineight.8m.com/
Message-ID: <edeqssct2kbsn162so8672gvh2ddpifoo0@4ax.com>
References: <969134507 DOT 984557 AT osiris DOT esoterica DOT pt> <39c3d96d DOT 43762513 AT news DOT freeserve DOT net> <2i7ass8e5jks0ihgakcv865vage2urr4ag AT 4ax DOT com> <20000923194722 DOT 9314823146 AT titan DOT progiciels-bpi DOT ca>
X-Newsreader: Forte Agent 1.7/32.534
MIME-Version: 1.0
Lines: 34
X-Trace: /bJ8XSzgy0BLiVL97LSHtm7QlI38glQ+lKtwnaFL47awRdp9QsP8qMACf1Y6hpTTHVhsc+83GcU/!xJUGi7dwLAF3nINkNCihOgeHOyRzLLZgRgHtsJIfpgQyMHTw5dY5XGlLHMcypDvsonVnMFGkkVXr!TFRoUQ==
X-Complaints-To: abuse AT gte DOT net
X-Abuse-Info: Please be sure to forward a copy of ALL headers
X-Abuse-Info: Otherwise we will be unable to process your complaint properly
NNTP-Posting-Date: Sat, 23 Sep 2000 23:18:57 GMT
Distribution: world
Date: Sat, 23 Sep 2000 23:18:57 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

On Sat, 23 Sep 2000 15:47:22 -0400 (EDT), Eli Zaretskii
<eliz AT is DOT elta DOT co DOT il> wrote:

>> From: Damian Yerrick <Bullcr_pd_yerrick AT hotmail DOT comRemoveBullcr_p>
>> Newsgroups: comp.os.msdos.djgpp
>> 
>> >Memory that is freed can be reused by your program (through
>> >malloc, calloc or realloc). Because it isn't returned to the
>> >DPMI server it can't be reused by a _different_ program,
>> 
>> True...
>> 
>> >but that's rarely a problem.
>> 
>> Unless your program calls spawn() or system() that is...
>
>No, it shouldn't be a problem even if `spawn*' functions _are_
>called.  The DPMI server is expected to page the parent program out of
>memory to accomodate the allocations required by the child program.
>This actually works, unless the child program uses raw XMS or similar
>calls to ask for extended memory, and even then only under certain
>memory managers

Or unless the program runs out of virtual memory (as has happened
to me several times on my old box with a tiny HD using CWSDPMI's
uncompressed swap file).

-- 
<O
( \   GNOME vs. KDE: the game!
 X    http://pineight.8m.com/nes.htm

This is McAfee VirusScan. Add these two lines to your signature to
prevent the spread of signature viruses.  http://www.mcafee.com/

- Raw text -


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