Date: Sun, 25 Jan 1998 11:41:41 +0200 (IST) From: Eli Zaretskii To: Andreas Bierhals 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: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk 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.