libc/minimal: fix malloc() allocated memory alignment
The definition for malloc() says that it should return a pointer to the allocated memory which is suitably aligned for any built-in type. This requirement was lost in commit 0c15627c ("lib: Remove sys_mem_pool implementation") where the entire memory pool used to have an explicit alignment of 16. Fix this by allocating memory with sys_heap_aligned_alloc() using __alignof__(z_max_align_t) which will automatically get the needed alignment on each platform. Signed-off-by:Nicolas Pitre <npitre@baylibre.com>
Loading
Please sign in to comment