Re: chunked_mempools - feedback needed

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Sat, 28 Apr 2001 11:09:13 +0200

Andres Kroonmaa wrote:

> in lib/MemPool.c:
> #define DISABLE_POOLS 1
>
> will effectively disable pooling and will revert back to pure xcalloc/xfree
>
> It only disables memPoolAlloc and memPoolFree. All else is left in.
> Probably enough for debugging? It would be difficult to rip off all code
> related to pools, and I think that is not needed.

If DISABLE_POOLS is moved up one level, and when set memPoolAlloc,
memPoolFree are replaced by macros calling calloc/free then pools are
fully disabled (the pool initialization is still required to set the
pool sizes and such, we can't get away from that)

> configure options are more like for endusers, imho. Should we do that?

MemPools is a memory allocator. There may well be that the user has a
malloc() implementation that is a lot better and faster. Or in case of
memory leaks he/she might want ot use a garbage collecting malloc while
waiting for a fix.. There are numerous reasons why one might want to
disable memory pools, not only debugging.

--
Henrik
Received on Sat Apr 28 2001 - 03:20:06 MDT

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