delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/25/04:44:39

Date: Sun, 25 Jan 1998 11:41:41 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Andreas Bierhals <bierhals AT stud DOT uni-hannover DOT de>
cc: djgpp AT delorie DOT com
Subject: Re: Memory leaks - how do I detect them?
In-Reply-To: <34ca6604.28305820@news.rrzn.uni-hannover.de>
Message-ID: <Pine.SUN.3.91.980125114120.6225M-100000@is>
MIME-Version: 1.0

On Sat, 24 Jan 1998, Andreas Bierhals wrote:

> DJGPP library functions don't release the free'd block back
> to the system memory.
> 
> - Does this also apply for _go32_dpmi_remaining_virtual_memory() ?

Yes.  The free'd memory is not returned to the system, it is left
allocated to the running program.  So neither physical nor virtual
memory sees the deallocation, because these reports come from the DPMI
server that is external to the program you run.

> - How do I really get the total amount of free memory using
>   the functions in dpmi.h ?

You can't.  You will need to hack the sources of `malloc' and `free',
or use a replacement `malloc' library.

- Raw text -


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