- choice: Supported heap sizes
Supported heap sizes
Type: bool
Help
Heaps using reduced-size chunk headers can accommodate so called
"small" heaps with a total size of 262136 bytes or less.
Heaps using full-size chunk headers can have a total size up to
16383 megabytes. The overhead is of course bigger.
On 32-bit system the tradeoff is selectable between:
- "small" heaps with low memory and runtime overhead;
- "big" heaps with bigger memory overhead even for small heaps;
- "auto" providing optimal memory overhead in all cases but with
a higher runtime overhead and somewhat bigger code footprint.
On 64-bit systems the "big" chunk header size conveniently provides
the needed alignment on returned memory allocations. Small chunk
headers would require alignment padding up to the big header size
anyway so "big" heap is the only option in that case.
Direct dependencies
(Includes any dependencies from ifs and menus.)
Defaults
SYS_HEAP_SMALL_ONLY
ifSRAM_SIZE
<= 256
Choice options
Kconfig definition
At <Zephyr>/lib/os/Kconfig:60
Included via <Zephyr>/Kconfig:8
→ <Zephyr>/Kconfig.zephyr:43
→ <Zephyr>/lib/Kconfig:10
Menu path: (Top) → Additional libraries → OS Support Library
choice
bool "Supported heap sizes"
default SYS_HEAP_SMALL_ONLY if SRAM_SIZE <= 256
default SYS_HEAP_AUTO
depends on !64BIT
help
Heaps using reduced-size chunk headers can accommodate so called
"small" heaps with a total size of 262136 bytes or less.
Heaps using full-size chunk headers can have a total size up to
16383 megabytes. The overhead is of course bigger.
On 32-bit system the tradeoff is selectable between:
- "small" heaps with low memory and runtime overhead;
- "big" heaps with bigger memory overhead even for small heaps;
- "auto" providing optimal memory overhead in all cases but with
a higher runtime overhead and somewhat bigger code footprint.
On 64-bit systems the "big" chunk header size conveniently provides
the needed alignment on returned memory allocations. Small chunk
headers would require alignment padding up to the big header size
anyway so "big" heap is the only option in that case.
(The ‘depends on’ condition includes propagated dependencies from ifs and menus.)