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:
Andy Ross 2020-04-03 10:01:03 -07:00 committed by Andrew Boie
commit 0dd83b8c2e
8 changed files with 180 additions and 33 deletions

View file

@ -8,6 +8,7 @@ add_library(kernel
fatal.c
idle.c
init.c
kheap.c
mailbox.c
mem_slab.c
mempool.c