Skip to content
Commit 32a437cb authored by Keith Packard's avatar Keith Packard Committed by Stephanos Ioannidis
Browse files

libc/common: Handle MMU/MPU/USERSPACE and alignment requirements in malloc



When CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE is set to -1, make the malloc
arena use all remaining RAM. When an MMU exists, allocate the arena at
startup using k_mem_map. Otherwise, compute the available memory
automatically and use that.

When an MPU is being used to manage the malloc arena, make sure the heap
respects any MPU alignment requirements. Otherwise, align the heap to
sizeof(double).

Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
parent bd1a7a36
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment