From: Hans-Bernhard Broeker Newsgroups: comp.os.msdos.djgpp Subject: Re: free() DOESN'T return memory to system Date: 18 Sep 2000 13:24:30 GMT Organization: Aachen University of Technology (RWTH) Lines: 24 Message-ID: <8q552e$m1c$1@nets3.rz.RWTH-Aachen.DE> References: <384411007 DOT 969036196326 DOT JavaMail DOT root AT web305-mc DOT mail DOT com> <969078416 DOT 841936 AT shelley DOT paradise DOT net DOT nz> <969134119 DOT 601345 AT osiris DOT esoterica DOT pt> NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de X-Trace: nets3.rz.RWTH-Aachen.DE 969283470 22572 137.226.32.75 (18 Sep 2000 13:24:30 GMT) X-Complaints-To: abuse AT rwth-aachen DOT de NNTP-Posting-Date: 18 Sep 2000 13:24:30 GMT Originator: broeker@ To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com almeidaj AT mail DOT com wrote: [...] > If you have a program that is constantly allocatting memory, and > freeing it when he no longer needs it, soon the resources are exauted. > Thus using free() has no impact, purelly a cosmetic sense. Sorry, but you seem to have missed the second part of the explanation of what free() does. Just because it doesn't free the memory for use by the system at large (i.e. Winblows) doesn't mean free() would do nothing at all. It *does* make the memory available for use by later malloc() calls in the same program. > I do know that MS Visual C, uses _heapmin() to solve this drawback. No. This is not what _heapmin() is for, originally. -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.