Merge branch 'feat/newlib-add-aligned-alloc_v5.2' into 'release/v5.2'

feat(newlib): Add definition of aligned_alloc to heap.c (backport v5.2)

See merge request espressif/esp-idf!29470
This commit is contained in:
Jiang Jiang Jian 2024-03-11 10:23:23 +08:00
commit 2ac4df6e47

View File

@ -74,6 +74,11 @@ void* memalign(size_t alignment, size_t n)
return heap_caps_aligned_alloc(alignment, n, MALLOC_CAP_DEFAULT);
}
void* aligned_alloc(size_t alignment, size_t n)
{
return heap_caps_aligned_alloc(alignment, n, MALLOC_CAP_DEFAULT);
}
int posix_memalign(void **out_ptr, size_t alignment, size_t size)
{
if (size == 0) {