diff options
author | daan <daanl@outlook.com> | 2021-12-17 11:40:46 -0800 |
---|---|---|
committer | daan <daanl@outlook.com> | 2021-12-17 11:40:46 -0800 |
commit | 684c2c82a795f527cff015ab1c6a32e8680cb165 (patch) | |
tree | 5e0093976d77fb48072cb92f63bc7a46ae23b502 /include/mimalloc-types.h | |
parent | 60790e9013eb8fe594cf7b3916baeae2cf03b03c (diff) |
restrict max aligment boundary to prevent bug with segment determination (found by Matthew Parkinson).
Diffstat (limited to 'include/mimalloc-types.h')
-rw-r--r-- | include/mimalloc-types.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/mimalloc-types.h b/include/mimalloc-types.h index c9f399d..d45a1ee 100644 --- a/include/mimalloc-types.h +++ b/include/mimalloc-types.h @@ -158,7 +158,10 @@ typedef int32_t mi_ssize_t; #define MI_BIN_HUGE (73U) #if (MI_LARGE_OBJ_WSIZE_MAX >= 655360) -#error "define more bins" +#error "mimalloc internal: define more bins" +#endif +#if (MI_ALIGNED_MAX > MI_SEGMENT_SIZE/2) +#error "mimalloc internal: the max aligned boundary is too large for the segment size" #endif // Used as a special value to encode block sizes in 32 bits. |