Re: Chunked mempools, a first verdict

From: Alex Rousskov <rousskov@dont-contact.us>
Date: Thu, 3 May 2001 09:14:10 -0600 (MDT)

On Thu, 3 May 2001, Andres Kroonmaa wrote:

> /* Public user API */
> extern MemPool *memPoolCreate(const char *label, size_t obj_size);
> extern void memPoolTune(MemPool * pool, size_t chunksize, int unused);
> extern void *memPoolAlloc(MemPool * pool);
> extern void memPoolFree(MemPool * pool, void *obj);
> extern void memPoolDestroy(MemPool * pool);
> extern int memPoolGetStats(MemPoolStats * stats, MemPool * pool, int index);

Did you mean to have both "pool" and "index" parameters there? What is
the semantics of the return value? Sorry if it was documented before.

Also, it may be a good idea to have
        memPoolGetStatsAll(MemPoolStatsAll*)
or some such because the internal routines may keep some global
statistics about all pools together (e.g., high water mark). You can
use that to get the count of existing pools for your iteration routine.

Thanks,

Alex.
Received on Thu May 03 2001 - 09:14:18 MDT

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