Date: Sun, 10 Nov 1996 15:16:26 +0200 (IST) From: Eli Zaretskii To: Elliott Oti Cc: djgpp AT delorie DOT com Subject: Re: Q: Problems with free() In-Reply-To: <32838E3B.3EB4@stud.warande.ruu.nl> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Fri, 8 Nov 1996, Elliott Oti wrote: > The output showed that the malloc'ed memory was *not* freed, despite the > call to free(). > > The Borland C equivalent using coreleft() instead of _go32_dpmi_remaining_ > physical_memory does return the correct amounts. > > What's happening? Did I miss something somewhere? You have missed section 15.2 in the DJGPP FAQ list (v2/faq202b.zip from the same place you get DJGPP). It explains that memory that is `free'ed is not returned to the DPMI server, and so `..._remaining_physical_memory' doesn't see it returned. It is just added to the pool of the free memory that `malloc' maintains.