Re: mempool patches

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Tue, 25 Aug 1998 22:57:58 +0200

Stephen R. van den Berg wrote:

> That's true. It simply never frees anything, so there is no idle
> limit to enforce. Not that this makes a difference in any regular
> squid setup.

And if may actually be beneficial to skip the idle limit, at least for
most smaller allocations, to further avoid fragmentation. If nothing is
freed then there can't be fragmentation ;-)

The malloc package on my Linux (glibc based) allocates memory aligned to
8 bytes, no smaller than 16 bytes and with 4 bytes fixed overhead.
(malloc of 1-12 bytes uses 16, 13-20 -> 24, 21-28 -> 32, ...). With
chunk based allocation the "malloc" overhead is only whats required for
alignment + a few bytes on each larger chunk (the true malloc overhead).
Sums up to somewhere in the range 4 to 11 bytes less on each allocation
for structures larger than 8 bytes. In the StoreEntry the difference is
8 bytes for each StoreEntry of 56 bytes, or 1/7 of the current
StoreEntry usage.

/Henrik
Received on Tue Jul 29 2003 - 13:15:53 MDT

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