1. Re: allocate() and free() Still Alive
- Posted by Euman <euman at BELLSOUTH.NET>
Dec 03, 2000
-
Last edited Dec 04, 2000
> > Rob Craig writes:
> >> I don't know of any language that gives
> >> heap space back to the operating system.
In Borland C++ 5.5 there is this
#include <malloc.h>
int _heapmin(void);
Releases unused heap areas.
The _heapmin function returns unused areas of the heap to the operating
system.
This allows other processes to use blocks that have been allocated and then
freed.
Due to fragmentation of the heap, _heapmin might not always be able to
return
unused memory to the operating system; this is not an error.
euman at bellsouth.net