cp_shared_mempool_calloc(3) - Linux man page
Name
cp_shared_mempool_alloc, cp_shared_mempool_calloc - obtain memory block from a shareable memory poolSynopsis
#include <cprops/mempool.h>void *cp_shared_mempool_alloc(cp_shared_mempool *pool, size_t size);
void *cp_shared_mempool_calloc(cp_shared_mempool *pool, size_t size);
Description
cp_shared_mempool_alloc attempts to obtain a memory block of at least size bytes from the shared memory pool pool. cp_shared_mempool_calloc is the same, but also sets the content of the returned memory block to zeros.For best results, use cp_shared_mempool to allocate fixed size blocks and register these sizes with the pool with cp_shared_mempool_register(3) in advance. cp_shared_mempool may also be used for arbitrary sized allocations, but this entails a larger allocation overhead and may be slower than native malloc/ free on some platforms.