summaryrefslogtreecommitdiff
path: root/src/alloc-aligned.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/alloc-aligned.c')
-rw-r--r--src/alloc-aligned.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/alloc-aligned.c b/src/alloc-aligned.c
index 6b15e65..fce0fd7 100644
--- a/src/alloc-aligned.c
+++ b/src/alloc-aligned.c
@@ -24,7 +24,7 @@ static mi_decl_noinline void* mi_heap_malloc_zero_aligned_at_fallback(mi_heap_t*
const size_t padsize = size + MI_PADDING_SIZE;
// use regular allocation if it is guaranteed to fit the alignment constraints
- if (offset==0 && alignment<=padsize && padsize<=MI_MEDIUM_OBJ_SIZE_MAX && (padsize&align_mask)==0) {
+ if (offset==0 && alignment<=padsize && padsize<=MI_MAX_ALIGN_GUARANTEE && (padsize&align_mask)==0) {
void* p = _mi_heap_malloc_zero(heap, size, zero);
mi_assert_internal(p == NULL || ((uintptr_t)p % alignment) == 0);
return p;