summaryrefslogtreecommitdiff
path: root/include/mimalloc-types.h
diff options
context:
space:
mode:
authordaan <daanl@outlook.com>2021-12-17 13:23:24 -0800
committerdaan <daanl@outlook.com>2021-12-17 13:23:24 -0800
commitabbff9c0307d0f3ac1334fe1a45a34c402ca1531 (patch)
tree7186020a4ebc5199f850b0ae6399d8b4cec4676f /include/mimalloc-types.h
parente6400bcc2797a419629e761056ee074a2b4f7f4d (diff)
parent89f583a69b86a06966fb07b4794b4046faa01fee (diff)
merge from dev (MI_ALIGNED_MAX)
Diffstat (limited to 'include/mimalloc-types.h')
-rw-r--r--include/mimalloc-types.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/include/mimalloc-types.h b/include/mimalloc-types.h
index 6899062..fbfee9c 100644
--- a/include/mimalloc-types.h
+++ b/include/mimalloc-types.h
@@ -162,11 +162,17 @@ typedef int32_t mi_ssize_t;
#define MI_BIN_HUGE (73U)
#if (MI_MEDIUM_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
+#if (MI_ALIGNED_MAX % MI_SEGMENT_SLICE_SIZE != 0)
+#error "mimalloc internal: the max aligned boundary must be an integral multiple of the segment slice size"
#endif
-// Maximum slice offset (7)
-#define MI_MAX_SLICE_OFFSET ((MI_MEDIUM_PAGE_SIZE / MI_SEGMENT_SLICE_SIZE) - 1)
+// Maximum slice offset (15)
+#define MI_MAX_SLICE_OFFSET ((MI_ALIGNED_MAX / MI_SEGMENT_SLICE_SIZE) - 1)
// Used as a special value to encode block sizes in 32 bits.
#define MI_HUGE_BLOCK_SIZE ((uint32_t)MI_HUGE_OBJ_SIZE_MAX)