Skip to content
Commit c822e0ab authored by Nicolas Pitre's avatar Nicolas Pitre Committed by Anas Nashif
Browse files

libc/minimal: fix realloc() allocated memory alignment



The definition for realloc() says that it should return a pointer
to the allocated memory which is suitably aligned for any built-in
type.

Turn sys_heap_realloc() into a sys_heap_aligned_realloc() and use it
with __alignof__(z_max_align_t) to implement realloc() with proper
memory alignment for any platform.

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