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).
8 lines
128 B
C
8 lines
128 B
C
#include <stdlib.h>
|
|
#include "malloc_impl.h"
|
|
|
|
void *aligned_alloc(size_t align, size_t len)
|
|
{
|
|
return __memalign(align, len);
|
|
}
|