From a7bd00eacccc41c60f79976bef927d4e2a467391 Mon Sep 17 00:00:00 2001 From: Guillaume Souchere Date: Wed, 31 Jan 2024 09:00:35 +0100 Subject: [PATCH] feat(newlib): Add definition of aligned_alloc to heap.c Add the definition of aligned_alloc to the list of definitions provided by heap.c. Note that memalign (strictly equivalent) to aligned_alloc is already defined in heap.c. --- components/newlib/heap.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/newlib/heap.c b/components/newlib/heap.c index f58817920c..5c30eaad0e 100644 --- a/components/newlib/heap.c +++ b/components/newlib/heap.c @@ -74,6 +74,11 @@ void* memalign(size_t alignment, size_t n) return heap_caps_aligned_alloc_default(alignment, n); } +void* aligned_alloc(size_t alignment, size_t n) +{ + return heap_caps_aligned_alloc_default(alignment, n); +} + int posix_memalign(void **out_ptr, size_t alignment, size_t size) { if (size == 0) {