From: Damian Yerrick 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: 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 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 wrote: >> From: Damian Yerrick >> 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). --