cmempool · Section 3
crmempool_calloc_entry
NAME
crmempool_calloc_entry - allocate zero-initialized entry
LIBRARY
C Collections (libccollections, -lccollections)
SYNOPSIS
#include <ccollections/cmempool.h> void *crmempool_calloc_entry(crmempool *rmp, size_t size);
DESCRIPTION
The same as crmempool_alloc_entry(), except that the requested number of bytes is set to zero before the entry is returned.
PARAMETERS
rmp Ranged memory pool to allocate from size Size in bytes to allocate
RETURN VALUE
Returns a pointer to the zeroed entry on success Returns NULL on failure
NOTES
Exactly 'size' bytes are zeroed, not the full pool element Thread-safe if the pool was created with single_threaded=false The function asserts if rmp is NULL