Re: Memory problems

From: Florian Lohoff <>
Date: Thu, 28 Nov 1996 14:22:39 +0100 (CET)

Martin Gleeson typed this originally:
> 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
> >exits.
> 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.

If i understand correctly.
Squid grows only if it uses more memory then used before. It keeps the
maximum size it reached once before. I cant believe this really as then
the size of the squid would once grow VERY fast in some minutes and
sometimes takes days. But my squids keep growing very slowly about a
week then they are min. 20MB (At start 4.5MB). If there would be a
bug in malloc implementation why dont i see this with other processes
like named, apache, cron etc ?


Florian Lohoff      Phone:+49-5241-340796
Privates Internet Ostwestfalen-Lippe, Guetersloh -
Received on Thu Nov 28 1996 - 05:47:34 MST

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