Mail Archives: djgpp/2002/04/19/04:30:25
> Date: Fri, 19 Apr 2002 03:45:31 -0300
> From: "R. Grela" <rgrela AT ciudad DOT com DOT ar>
> I'm writing a class that uses pointers and I want to check if all of them
> are destroyed correctly, so I'm looking for a function that gives me some
> information about the memory available or memory used to check if at the
> program starts and the program ends the memory available is exactly equal.
There's nothing in the released version of DJGPP 2.03 to provide this
functionality. The development sources in the CVS have a function
called `mallinfo' that reports the current heap usage. You could
download the modified malloc.c and the new malldbg.c modules from the
CVS tree (via the anon CVS access) and use them in your program.
> I don't know how memory management is implemented in programs compiled with
> djgpp, I've looked the _go32_dpmi_get_free_memory_information function in
> go32.h but I've make a test to get that information before and after making
> MyObject* obj = new MyObject; and I get the same results viewing the field
> available_physical_pages in _go32_dpmi_meminfo structure.
This is expected: DJGPP never returns memory to the OS. See section
15.2 of the DJGPP FAQ list for more details about this.
- Raw text -