lib: heap: make multi-heap feature configurable
Make multi-heap configurable via Kconfig and adapt existing tests. Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
d398e9631b
commit
740d0c3b50
|
@ -2,12 +2,11 @@
|
|||
|
||||
zephyr_sources(
|
||||
heap.c
|
||||
multi_heap.c
|
||||
)
|
||||
|
||||
zephyr_sources_ifdef(CONFIG_SYS_HEAP_INFO heap_info.c)
|
||||
zephyr_sources_ifdef(CONFIG_SYS_HEAP_VALIDATE heap_validate.c)
|
||||
zephyr_sources_ifdef(CONFIG_SYS_HEAP_STRESS heap_stress.c)
|
||||
zephyr_sources_ifdef(CONFIG_SHARED_MULTI_HEAP shared_multi_heap.c)
|
||||
|
||||
zephyr_sources_ifdef(CONFIG_MULTI_HEAP multi_heap.c)
|
||||
zephyr_sources_ifdef(CONFIG_HEAP_LISTENER heap_listener.c)
|
||||
|
|
|
@ -112,8 +112,20 @@ config SYS_HEAP_AUTO
|
|||
|
||||
endchoice
|
||||
|
||||
config MULTI_HEAP
|
||||
bool "Multi-heap manager"
|
||||
help
|
||||
Allows multiple sys_heap regions to be unified under a single
|
||||
allocation API. Sometimes apps need the ability to share multiple
|
||||
discontiguous regions in a single "heap", or
|
||||
to have memory of different "types" be allocated heuristically based
|
||||
on usage (e.g. cacheability, latency, power...). This allows a
|
||||
user-specified function to select the underlying memory to use for
|
||||
each application.
|
||||
|
||||
config SHARED_MULTI_HEAP
|
||||
bool "Shared multi-heap manager"
|
||||
select MULTI_HEAP
|
||||
help
|
||||
Enable support for a shared multi-heap manager that uses the
|
||||
multi-heap allocator to manage a set of reserved memory regions with
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
CONFIG_ZTEST=y
|
||||
CONFIG_HEAP_MEM_POOL_SIZE=256
|
||||
CONFIG_MULTI_HEAP=y
|
||||
|
|
Loading…
Reference in a new issue