Search squid archive

Re: mallinfo() vs. sbrk()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



thx.

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

Cheers,


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       mnot@xxxxxxxxxxxxx



[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux