cp_shared_mempool(3) is a shareable memory pool implementation based on cp_mempool. Both cp_mempool and cp_shared_mempool represent a trade off of memory for speed and should not be used if memory is tight or if the total allocation may exceed the amount of physical memory available to the program, so as to prevent swapping. Note that even if using the provided cp_mempool_free or cp_shared_mempool_free functions, the memory returned to the pool is kept for future requests and is ultimately released back to the general "malloc" library only when the memory pool is destroyed.
cp_mempool *cp_mempool_create_by_option(const int mode,
const size_t chunksize,
cp_mempool *cp_mempool_create(const size_t chunksize);
int cp_mempool_inc_refcount(cp_mempool *pool);
void *cp_mempool_alloc(cp_mempool * const pool);
void *cp_mempool_calloc(cp_mempool * const pool);
int cp_mempool_free(cp_mempool * const pool, void *data);
void cp_mempool_destroy(cp_mempool *pool);
This document was created by
using the manual pages.
Time: 17:58:11 GMT, September 08, 2006