From c80564ef9f557fadd235b87533b24d126e2138c9 Mon Sep 17 00:00:00 2001 From: Stefan Werner Date: Fri, 13 Sep 2019 22:49:26 +0200 Subject: macOS: Enabled posix_memalign() like on other Unix platforms. --- intern/guardedalloc/intern/mallocn.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'intern/guardedalloc') diff --git a/intern/guardedalloc/intern/mallocn.c b/intern/guardedalloc/intern/mallocn.c index 1c96856fd0d..ac970a8c610 100644 --- a/intern/guardedalloc/intern/mallocn.c +++ b/intern/guardedalloc/intern/mallocn.c @@ -72,14 +72,7 @@ void *aligned_malloc(size_t size, size_t alignment) { #ifdef _WIN32 return _aligned_malloc(size, alignment); -#elif defined(__APPLE__) - /* On Mac OS X, both the heap and the stack are guaranteed 16-byte aligned so - * they work natively with SSE types with no further work. - */ - assert(alignment == 16); - (void)alignment; - return malloc(size); -#elif defined(__FreeBSD__) || defined(__NetBSD__) +#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined (__APPLE__) void *result; if (posix_memalign(&result, alignment, size)) { -- cgit v1.2.3