Re: chunked MemPool

From: Andres Kroonmaa <andre@dont-contact.us>
Date: Tue, 10 Apr 2001 11:35:22 +0200

On 30 Mar 2001, at 12:50, Henrik Nordstrom <hno@hem.passagen.se> wrote:

> > cpu overhead is quite minimal. Mostly is during a free, as we
> > have to find a chunk where the obj belongs. The more chunks in
> > a pool, the more overhead. But in terms of CPU ticks it wasn't
> > bad at all. I also zero out freed objects, and this takes on
> > average more time than finding a chunk. Basically, CPU times
> > were comparable to old mempool very closely.
>
> And hashes or similar "chunk indexes" can be used to reduce the
> searching considerably.

 I'm wondering how portable memalign() is?
 If we pick chunksize rounded up to pagesize or power of 2, and
 use equalsized chunks per pool, it looks tempting to use this
 alignment assumption to calculate chunk start from any given ptr.
 Then chunk searching overhead would not depend on number of chunks
 at all.

------------------------------------
 Andres Kroonmaa <andre@online.ee>
 CTO, Delfi Online
 Tel: 6501 731, Fax: 6501 708
 Pärnu mnt. 158, Tallinn,
 11317 Estonia
Received on Tue Apr 10 2001 - 03:39:50 MDT

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