summaryrefslogtreecommitdiff
path: root/include/mimalloc-internal.h
diff options
context:
space:
mode:
authordaan <daanl@outlook.com>2021-11-12 18:38:14 -0800
committerdaan <daanl@outlook.com>2021-11-12 18:38:14 -0800
commit335d5544389b9f3c633e4b8d645ef4d48f43ba0e (patch)
tree128039e1819b3a17a4dd3e399c31fc12047e0777 /include/mimalloc-internal.h
parentb1aff903f5622a549572bc833473ee2295b17844 (diff)
parentc6b82a4b37b8bdf0ccc754371492c632c3376311 (diff)
merge from dev-slice
Diffstat (limited to 'include/mimalloc-internal.h')
-rw-r--r--include/mimalloc-internal.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/mimalloc-internal.h b/include/mimalloc-internal.h
index 4e05c72..12d050f 100644
--- a/include/mimalloc-internal.h
+++ b/include/mimalloc-internal.h
@@ -497,6 +497,10 @@ static inline size_t mi_segment_size(mi_segment_t* segment) {
return segment->segment_slices * MI_SEGMENT_SLICE_SIZE;
}
+static inline uint8_t* mi_segment_end(mi_segment_t* segment) {
+ return (uint8_t*)segment + mi_segment_size(segment);
+}
+
// Thread free access
static inline mi_block_t* mi_page_thread_free(const mi_page_t* page) {
return (mi_block_t*)(mi_atomic_load_relaxed(&((mi_page_t*)page)->xthread_free) & ~3);