...
lib_mem.h/lib_mem.c
Prototype
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
void Mem_DynPoolCreate (const CPU_CHAR *p_name, MEM_DYN_POOL *p_pool, MEM_SEG *p_seg, CPU_SIZE_T blk_size, CPU_SIZE_T blk_align, CPU_SIZE_T blk_qty_init, CPU_SIZE_T blk_qty_max, LIB_ERR *p_err) |
...
Pointer to segment from which to allocate memory. Passing DEF_NULL
will allocate memory from the general-purpose heap.
blk_size
Size of memory block to allocate from pool, in bytes. See Note #1.
...
Required Configuration
None.
Notes / Warnings
- 'blk_size' must be big enough to fit a pointer since the pointer to the next free block is stored in the block itself (only when free/unused)An usage example of this function is available on Dynamic Memory Pools page.