summaryrefslogtreecommitdiff
path: root/src/malloc/memalign.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2020-06-03 19:11:23 -0400
committerRich Felker <dalias@aerifal.cx>2020-06-03 19:11:23 -0400
commitd1e6fdd3674eff0e09554c7ddc431acb8925232f (patch)
tree0181f78dc2700d2028eb2e354030c648326506a6 /src/malloc/memalign.c
parentde798308e8a06608bb5a184dc209002ae1e0a142 (diff)
downloadmusl-d1e6fdd3674eff0e09554c7ddc431acb8925232f.tar.gz
reverse dependency order of memalign and aligned_alloc
this change eliminates the internal __memalign function and makes the memalign and posix_memalign functions completely independent of the malloc implementation, written portably in terms of aligned_alloc.
Diffstat (limited to 'src/malloc/memalign.c')
-rw-r--r--src/malloc/memalign.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/malloc/memalign.c b/src/malloc/memalign.c
index cf9dfbda..e06c76ed 100644
--- a/src/malloc/memalign.c
+++ b/src/malloc/memalign.c
@@ -3,7 +3,7 @@
#include <errno.h>
#include "malloc_impl.h"
-void *__memalign(size_t align, size_t len)
+void *aligned_alloc(size_t align, size_t len)
{
unsigned char *mem, *new;
@@ -50,5 +50,3 @@ void *__memalign(size_t align, size_t len)
__bin_chunk(c);
return new;
}
-
-weak_alias(__memalign, memalign);