Adds a new chunk of memory to the heap. A chunk is a memory buffer which is allocated externally to the heap.
int heap_add_chunk(void *chunk, size_t chunklen);
Parameters
chunk
- Pointer to a memory buffer.
chunklen
- Length of memory buffer in bytes.
Return Values
0
(zero)
- Success.
-1
- 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