diff options
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/alloc.c b/src/alloc.c index b40c1f387cb..f0e9f208ca3 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -1122,10 +1122,17 @@ lisp_free (void *block) | |||
| 1122 | 1122 | ||
| 1123 | /* Use aligned_alloc if it or a simple substitute is available. | 1123 | /* Use aligned_alloc if it or a simple substitute is available. |
| 1124 | Address sanitization breaks aligned allocation, as of gcc 4.8.2 and | 1124 | Address sanitization breaks aligned allocation, as of gcc 4.8.2 and |
| 1125 | clang 3.3 anyway. */ | 1125 | clang 3.3 anyway. Aligned allocation is incompatible with |
| 1126 | unexmacosx.c, so don't use it on Darwin. */ | ||
| 1126 | 1127 | ||
| 1127 | #if ! ADDRESS_SANITIZER | 1128 | #if ! ADDRESS_SANITIZER && !defined DARWIN_OS |
| 1128 | # if defined HYBRID_MALLOC | 1129 | # if !defined SYSTEM_MALLOC && !defined DOUG_LEA_MALLOC && !defined HYBRID_MALLOC |
| 1130 | # define USE_ALIGNED_ALLOC 1 | ||
| 1131 | # ifndef HAVE_ALIGNED_ALLOC | ||
| 1132 | /* Defined in gmalloc.c. */ | ||
| 1133 | void *aligned_alloc (size_t, size_t); | ||
| 1134 | # endif | ||
| 1135 | # elif defined HYBRID_MALLOC | ||
| 1129 | # if defined HAVE_ALIGNED_ALLOC || defined HAVE_POSIX_MEMALIGN | 1136 | # if defined HAVE_ALIGNED_ALLOC || defined HAVE_POSIX_MEMALIGN |
| 1130 | # define USE_ALIGNED_ALLOC 1 | 1137 | # define USE_ALIGNED_ALLOC 1 |
| 1131 | # endif | 1138 | # endif |