Skip to content

Commit

Permalink
Merge branch 'feat/newlib-add-aligned-alloc_v5.1' into 'release/v5.1'
Browse files Browse the repository at this point in the history
feat(newlib): Add definition of aligned_alloc to heap.c (backport v5.1)

See merge request espressif/esp-idf!29471
  • Loading branch information
ESP-Marius committed Mar 13, 2024
2 parents a8a178a + 7c82811 commit 663d42f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions components/newlib/heap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 663d42f

Please sign in to comment.