www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/11/10/08:33:57

Date: Sun, 10 Nov 1996 15:16:26 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Elliott Oti <e DOT oti AT stud DOT warande DOT ruu DOT nl>
Cc: djgpp AT delorie DOT com
Subject: Re: Q: Problems with free()
In-Reply-To: <32838E3B.3EB4@stud.warande.ruu.nl>
Message-Id: <Pine.SUN.3.91.961110151318.8417P-100000@is>
Mime-Version: 1.0

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.

- Raw text -


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