Nicholas Nethercote dcea4e928e Removed some Darwin-specific code that crept in from the DARWIN branch.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9599
2009-04-24 04:28:15 +00:00

19 lines
374 B
C

// Replacement for malloc.h which factors out platform differences.
#include <stdlib.h>
#include <malloc.h>
#include <assert.h>
// Allocates a 16-aligned block. Asserts if the allocation fails.
__attribute__((unused))
static void* memalign16(size_t szB)
{
void* x;
x = memalign(16, szB);
assert(x);
assert(0 == ((16-1) & (unsigned long)x));
return x;
}