1 // Replacement for malloc.h which factors out platform differences.
4 #if defined(VGO_darwin)
5 # include <malloc/malloc.h>
12 // Allocates a 16-aligned block. Asserts if the allocation fails.
13 __attribute__((unused
))
14 static void* memalign16(size_t szB
)
17 #if defined(VGO_darwin)
18 // Darwin lacks memalign, but its malloc is always 16-aligned anyway.
21 x
= memalign(16, szB
);
24 assert(0 == ((16-1) & (unsigned long)x
));