Solved
How do I force the program to free memory?
Posted on 2001-09-11
I'm using HP-UX.11 (but we have to port software to Sun and other platforms
so the solution must be portable too).
I have understood that when process allocates memory then it of course
gets it, but never really frees it (even when you call delete/free in your program).
So that memory is never released to other processes but kept reserved for
that single process. So when process calls delete the memory is not freed
to other process and when the same process calls new/malloc() the memory
is take from that memory space that has been reserved for that process.
Is there a way to force the program to release the memory or somehow
configure OS so that it releases the memory?