INtime SDK Help
mpool_add_chunk
INtime SDK v6 > About INtime > Other system libraries > Heaps and memory pools > Memory pools > mpool_add_chunk

Adds a new chunk of memory to a mpool. A chunk is a memory buffer which is allocated externally to the mpool.  

BOOLEAN mpool_add_chunk(MPOOL pool, void *chunk, size_t chunklen);

Parameters

pool
The memory pool created by mpool_create.
chunk
Pointer to a memory buffer.
chunklen
Length of memory buffer in bytes.

Return Values

TRUE
Success.
FALSE
The function failed and sets errno to one of these values:
E2BIG The chunk length is more than LONG_MAX
EINVAL The chuck pointer is invalid or the length is less than 4096 bytes.

Requirements

Versions Defined in Include Link to
INtime 6.0 intime/rt/include/heap.h heap.h clib.lib
See Also

C library