apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sander Striker" <stri...@apache.org>
Subject RE: SMS usage patterns, hierarchies
Date Wed, 11 Jul 2001 19:37:27 GMT
> if you use malloc/free directly (for blocks, not for each palloc) and have
> no free list then on linux the ptmalloc built into libc will do per-cpu
> free listing for you.  similarly on solaris with the shipped mtmalloc
> library.  and on either of those platforms with the hoard library.

> so what i've been advocating is to get rid of the free lists and leave it
> up to the vendors (or a malloc replacement library) to do the right thing.

Well, we can always do a version of trivial which just free's the blocks
when it needs to. And when it needs a block, allocate it instead of
through a free list.

The search is linear, so with a large free list you might take longer.
I wanted to do something about this by grouping blocks of the same
size or keeping the blocks sorted (a fibonacci heap came to mind). I didn't
see calling free on the blocks as an option really (more so because the
pools code didn't :). We can always try and test.


View raw message