diff options
author | daan <daanl@outlook.com> | 2019-08-15 11:49:56 -0700 |
---|---|---|
committer | daan <daanl@outlook.com> | 2019-08-15 11:49:56 -0700 |
commit | f2bafbc57f0604c74bf47fbd105d16a7bb951bcc (patch) | |
tree | df468ad02cde2933343defcea99d9729a7c16b0d /include/mimalloc-internal.h | |
parent | bbd81bbbd1bbe1de30b09dcfc6da22f31c4f5768 (diff) |
wip: new segment allocation
Diffstat (limited to 'include/mimalloc-internal.h')
-rw-r--r-- | include/mimalloc-internal.h | 2 |
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]; |