the malloc-implementation-private header is the only right place for
this, because, being in the reserved namespace, __memalign is not
interposable and thus not valid to use anywhere else. anything outside
of the malloc implementation must call an appropriate-namespace public
function (aligned_alloc or posix_memalign).
void __malloc_donate(char *, char *);
+void *__memalign(size_t, size_t);
+
struct chunk {
size_t psize, csize;
struct chunk *next, *prev;
#include <stdlib.h>
-
-void *__memalign(size_t, size_t);
+#include "malloc_impl.h"
void *aligned_alloc(size_t align, size_t len)
{
#include <stdlib.h>
#include <errno.h>
-
-void *__memalign(size_t, size_t);
+#include "malloc_impl.h"
int posix_memalign(void **res, size_t align, size_t len)
{