Skip to content
Commit 9da06456 authored by Nicolas Pitre's avatar Nicolas Pitre Committed by Benjamin Cabé
Browse files

kernel: kheap: decouple simple alloc from aligned_alloc



When k_heap_alloc() is expressed in terms of k_heap_aligned_alloc()
it invokes a longer aligned allocation code path with an extra runtime
overhead even though no alignment is necessary.

Let's reference and invoke the aligned allocation code path only when an
actual aligned allocation is requested. This opens the possibility for
the linker to garbage-collect the aligning code otherwise.

Signed-off-by: default avatarNicolas Pitre <npitre@baylibre.com>
parent 31244724
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment