kernel: Add k_heap synchronized memory allocator
This adds a k_heap data structure, a synchronized wrapper around a sys_heap memory allocator. As of this patch, it is an alternative implementation to k_mem_pool() with somewhat better efficiency and performance and more conventional (and convenient) behavior. Note that commit involves some header motion to break dependencies. The declaration for struct k_spinlock moves to kernel_structs.h, and a bunch of includes were trimmed. Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit is contained in:
parent
e96ac9061f
commit
0dd83b8c2e
8 changed files with 180 additions and 33 deletions
|
@ -76,6 +76,13 @@
|
|||
_k_mem_pool_list_end = .;
|
||||
} GROUP_DATA_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
|
||||
|
||||
SECTION_DATA_PROLOGUE(_k_heap_area,,SUBALIGN(4))
|
||||
{
|
||||
_k_heap_list_start = .;
|
||||
KEEP(*("._k_heap.static.*"))
|
||||
_k_heap_list_end = .;
|
||||
} GROUP_DATA_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
|
||||
|
||||
SECTION_DATA_PROLOGUE(_k_sem_area,,SUBALIGN(4))
|
||||
{
|
||||
_k_sem_list_start = .;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue