aa6de29c4b
We would like to offer the capability to have memory pool heap data structures that are usable from user mode threads. The current k_mem_pool implementation uses IRQ locking and system-wide membership lists that make it incompatible with user mode constraints. However, much of the existing memory pool code can be abstracted to some common functions that are used by both k_mem_pool and the new sys_mem_pool implementations. The sys_mem_pool implementation has the following differences: * The alloc/free APIs work directly with pointers, no internal memory block structures are exposed to the end user. A pointer to the source pool is provided for allocation, but freeing memory just requires the pointer and nothing else. * k_mem_pool uses IRQ locks and required very fine-grained locking in order to not affect system latency. sys_mem_pools just use a semaphore to protect the pool data structures at the API level, since there aren't implications for system responsiveness with this kind of concurrency control. * sys_mem_pools do not support the notion of timeouts for requesting memory. * sys_mem_pools are specified at compile time with macros, just like kernel memory pools. Alternative forms of specification at runtime will be a later enhancement. Signed-off-by: Andrew Boie <andrew.p.boie@intel.com> |
||
---|---|---|
.. | ||
__assert.h | ||
byteorder.h | ||
dlist.h | ||
mempool.h | ||
mempool_base.h | ||
printk.h | ||
reboot.h | ||
ring_buffer.h | ||
slist.h | ||
stack.h | ||
util.h |