From: Eli Zaretskii To: djgpp AT delorie DOT com In-reply-to: <2i7ass8e5jks0ihgakcv865vage2urr4ag@4ax.com> (message from Damian Yerrick on Sun, 17 Sep 2000 19:43:00 GMT) Subject: Re: Repost: free() DOESN´T return memory to the system References: <969134507 DOT 984557 AT osiris DOT esoterica DOT pt> <39c3d96d DOT 43762513 AT news DOT freeserve DOT net> <2i7ass8e5jks0ihgakcv865vage2urr4ag AT 4ax DOT com> Message-Id: <20000923194722.9314823146@titan.progiciels-bpi.ca> Date: Sat, 23 Sep 2000 15:47:22 -0400 (EDT) Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > 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.