summaryrefslogtreecommitdiff
path: root/include/mimalloc-internal.h
diff options
context:
space:
mode:
authordaan <daanl@outlook.com>2019-08-15 11:49:56 -0700
committerdaan <daanl@outlook.com>2019-08-15 11:49:56 -0700
commitf2bafbc57f0604c74bf47fbd105d16a7bb951bcc (patch)
treedf468ad02cde2933343defcea99d9729a7c16b0d /include/mimalloc-internal.h
parentbbd81bbbd1bbe1de30b09dcfc6da22f31c4f5768 (diff)
wip: new segment allocation
Diffstat (limited to 'include/mimalloc-internal.h')
-rw-r--r--include/mimalloc-internal.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/mimalloc-internal.h b/include/mimalloc-internal.h
index f17d8af..e8fa1ba 100644
--- a/include/mimalloc-internal.h
+++ b/include/mimalloc-internal.h
@@ -271,7 +271,7 @@ static inline mi_segment_t* _mi_page_segment(const mi_page_t* page) {
// Get the page containing the pointer
static inline mi_page_t* _mi_segment_page_of(const mi_segment_t* segment, const void* p) {
ptrdiff_t diff = (uint8_t*)p - (uint8_t*)segment;
- mi_assert_internal(diff >= 0 && diff < MI_SEGMENT_SIZE);
+ mi_assert_internal(diff >= 0 && diff < (ptrdiff_t)MI_SEGMENT_SIZE);
uintptr_t idx = (uintptr_t)diff >> MI_SEGMENT_SLICE_SHIFT;
mi_assert_internal(idx < segment->slice_count);
mi_slice_t* slice0 = (mi_slice_t*)&segment->slices[idx];