Re: Memory problems

From: Martin Gleeson <>
Date: Thu, 28 Nov 1996 14:12:59 +1100

On 28/11/96, James R Grinter wrote:
>On Thu 28 Nov, 1996, David Lee wrote:
>>2) Why is it not releasing unneeded memory back to the OS when the
>>memory_pools option is set to 'off'
>this I can answer: Very few malloc() implementations actually
>release memory back to the OS when you free(), until the process

As far as I'm aware, no implementations of malloc do this. They just free
the memory back to malloc for the next time you ask for it. To free it back
to the OS would require some sort of hook in the OS to handle that sort of
thing. And I'm not aware of any OS/malloc combos that will do this. But of
course I reserve the right to be completely wrong :-)

It sounds like the malloc on your machine isn't keeping track of some of
the blocks that have been free()'d back to it, giving you a memory leak.

I echo James' suggestion of linking in gnumalloc instead of the default
malloc. It has done wonders for us, both in memory usage and performance.

Martin Gleeson Webmeister |
Information Technology Services | Email :
The University of Melbourne, Oz. | Phone : +61 3 9344 7407
       "I hate quotations" -- Ralph Waldo Emerson; Journals (1843)
Received on Wed Nov 27 1996 - 19:25:18 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:33:40 MST