Re: [squid-users] mallinfo() vs. sbrk()

From: Mark Nottingham <>
Date: Fri, 7 Nov 2008 10:36:38 -0800


When mallinfo fails, how does it appear in cachemgr -- i.e., is there
any way to reliably detect it just by examining the output?


On 06/11/2008, at 7:03 PM, Henrik Nordstrom wrote:

> On tor, 2008-11-06 at 13:17 -0800, Mark Nottingham wrote:
>> I remember reading somewhere (can't forget where, and I may be
>> incorrect) that when available, sbrk is a more reliable indication of
>> memory use for squid than mallinfo().
> mallinfo is more reliabe than sbrk when it works... but at least Linux
> mallinfo fails when the process grows above 2GB in size..
> mallinfo includes all memory allocated by the memory allocator (malloc
> and friends).
> sbrk includes the size of the data segment, where most memory
> allocations go, but not all. Large allocations is handled by malloc
> outside of the data segment.
> Regards
> Henrik

Mark Nottingham
Received on Fri Nov 07 2008 - 18:37:59 MST

This archive was generated by hypermail 2.2.0 : Sat Nov 08 2008 - 12:00:01 MST