diff options
author | Stefan Werner <stefan.werner@tangent-animation.com> | 2019-09-13 23:49:26 +0300 |
---|---|---|
committer | Stefan Werner <stefan.werner@tangent-animation.com> | 2019-09-13 23:49:26 +0300 |
commit | c80564ef9f557fadd235b87533b24d126e2138c9 (patch) | |
tree | 335bdef76913ef91871f111e4a2f7a929c52cd3e /intern/cycles | |
parent | 57e0e520e89b1de8fec424a2be4f90a59d7557dc (diff) |
macOS: Enabled posix_memalign() like on other Unix platforms.
Diffstat (limited to 'intern/cycles')
-rw-r--r-- | intern/cycles/util/util_aligned_malloc.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/intern/cycles/util/util_aligned_malloc.cpp b/intern/cycles/util/util_aligned_malloc.cpp index 104e6c5e3f4..9b729cd4fc4 100644 --- a/intern/cycles/util/util_aligned_malloc.cpp +++ b/intern/cycles/util/util_aligned_malloc.cpp @@ -46,13 +46,7 @@ void *util_aligned_malloc(size_t size, int alignment) return MEM_mallocN_aligned(size, alignment, "Cycles Aligned Alloc"); #elif defined(_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); - return malloc(size); -#elif defined(__FreeBSD__) || defined(__NetBSD__) +#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__) void *result; if (posix_memalign(&result, alignment, size)) { /* Non-zero means allocation error |