aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/alloc.c b/src/alloc.c
index d379761c168..5f74d9061e5 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -1105,15 +1105,18 @@ lisp_free (void *block)
1105 1105
1106/* Use aligned_alloc if it or a simple substitute is available. 1106/* Use aligned_alloc if it or a simple substitute is available.
1107 Address sanitization breaks aligned allocation, as of gcc 4.8.2 and 1107 Address sanitization breaks aligned allocation, as of gcc 4.8.2 and
1108 clang 3.3 anyway. */ 1108 clang 3.3 anyway. Aligned allocation is incompatible with
1109 unexmacosx.c, so don't use it on Darwin. */
1109 1110
1110#if ! ADDRESS_SANITIZER 1111#if ! ADDRESS_SANITIZER && ! DARWIN_OS
1111# if !defined SYSTEM_MALLOC && !defined DOUG_LEA_MALLOC && !defined HYBRID_MALLOC 1112# if !defined SYSTEM_MALLOC && !defined DOUG_LEA_MALLOC && !defined HYBRID_MALLOC
1112# define USE_ALIGNED_ALLOC 1 1113# define USE_ALIGNED_ALLOC 1
1114# ifndef HAVE_ALIGNED_ALLOC
1113/* Defined in gmalloc.c. */ 1115/* Defined in gmalloc.c. */
1114void *aligned_alloc (size_t, size_t); 1116void *aligned_alloc (size_t, size_t);
1117# endif
1115# elif defined HYBRID_MALLOC 1118# elif defined HYBRID_MALLOC
1116# if defined ALIGNED_ALLOC || defined HAVE_POSIX_MEMALIGN 1119# if defined HAVE_ALIGNED_ALLOC || defined HAVE_POSIX_MEMALIGN
1117# define USE_ALIGNED_ALLOC 1 1120# define USE_ALIGNED_ALLOC 1
1118# define aligned_alloc hybrid_aligned_alloc 1121# define aligned_alloc hybrid_aligned_alloc
1119/* Defined in gmalloc.c. */ 1122/* Defined in gmalloc.c. */