Re: sdirno/sfileno sizes

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Fri, 30 Mar 2001 15:13:16 +0200

Andres Kroonmaa wrote:

> I hoped so too. But no. malloc aligns mmaped allocs to a page start.
> And it always _prepends_ its overhead. Because it doesn't know the
> alloc size at free() time, so it looks at front of it to find its
> housekeeping. With a mmap this unavoidably means that any mmaped
> alloc has a 1 page waste prepended... Requesting less gives nothing.

Ah, well. Maybe I am confused about dlmalloc (do not use it very often).

The GNU libc malloc I know behaves well.. (header at start of page,
followed by allocation).

> > Yes. And as the number of pools are growing a lot in 2.5 with lots of
> > small pools we probably want to decrease the lower limit to only a few
> > kb.
>
> thats very easy with Tune function.

if you can find a good place to do that tuning yes.. perhaps not that
easy as most of those pools are hidden from the caller using macros
(part of cbdata).

Probably easier to change the default to allow for small chunks, and
then tune the ones needed to require bigger chunks.. or perhaps even use
some dynamic approach where chunk sizes grows with population.

> > Do you mind putting this improved mempool up on SourceForge to ease
> > further development and testing until merged into HEAD?
>
> Not at all. Just I don't know how to do it, and lacking time.

It is not very hard nor timeconsuming, but requires you to have a
SourceForge account, some minimal CVS experience and download a script
from squid.sourceforge.net/CVS.html which takes care of the gory details
of creating a branch...

/Henrik
Received on Fri Mar 30 2001 - 06:24:52 MST

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