Re: MemPools rewrite

From: Andres Kroonmaa <andre@dont-contact.us>
Date: Tue, 7 Nov 2000 22:54:22 +0200

On 19 Oct 2000, at 21:35, Henrik Nordstrom <hno@hem.passagen.se> wrote:

> Andres Kroonmaa wrote:
>
> > both current and proposed memPools keep track of freelist with an
> > array of pointers. I guess this is done to increase the speed of
> > allocs/frees, but has quite large memory overhead for allocation
> > sizes comparable to size of pointer. On 64-bit systems pointers
> > are 8-bytes...
>
> Which can quite easily be addressed by using the object as the list
> node. However, that makes the pool very sensitive to misuse after free..

 seems that I've hit exactly this issue.
 Now I wonder how should I handle it in mempools: try detect and crash,
 or try to make pool resistant to this issue. one would need cpu overhead,
 other would need to keep freelist separate, ie. memory overhead.

> > In chunked design, it is possible to keep track of freelist with
> > bit-arrays.
>
> In a list design you don't even need the bitmap.

 bitmap is looking attractive again...

------------------------------------
 Andres Kroonmaa <andre@online.ee>
 Delfi Online
 Tel: 6501 731, Fax: 6501 708
 Pärnu mnt. 158, Tallinn,
 11317 Estonia
Received on Tue Nov 07 2000 - 13:57:13 MST

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