cp_mempool_calloc(3) - Linux man page

Name

cp_mempool_alloc, cp_mempool_calloc - obtain memory block from a memory

pool

Synopsis

#include <cprops/mempool.h>

void *cp_mempool_alloc(cp_mempool * const pool);
void *cp_mempool_calloc(cp_mempool * const pool);

Description

cp_mempool_alloc returns an uninitialized memory block of the size defined at pool creation time from the memory pool.

cp_mempool_calloc returns a memory block of the size defined at pool creation time, initialized to contain zeros.

Return Value

a pointer to a memory block of the requested size or NULL if no more memory is available. cp_mempool will expand automatically if the internal allocation is exhausted, but may fail if the internal expansion operation fails.

See Also

cp_mempool_create(3), cp_mempool_free(3), cp_mempool_destroy(3), cp_shared_mempool(3)

Referenced By

cp_shared_mempool_free(3)