Browse Source
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: Nicolas Pitre <npitre@baylibre.com>pull/31896/head
4 changed files with 60 additions and 16 deletions
Loading…
Reference in new issue