summaryrefslogtreecommitdiff
path: root/include/mimalloc-types.h
diff options
context:
space:
mode:
authordaan <daanl@outlook.com>2020-09-05 19:39:10 -0700
committerdaan <daanl@outlook.com>2020-09-05 19:39:10 -0700
commit63a9f45ba64e44162fa0de41030e0d012c5bcbba (patch)
tree0a952b456d726b65ae3f7114c066b20ead8576c7 /include/mimalloc-types.h
parent36da7e91c52b123abcb61e96ed897ae22ba93402 (diff)
add initial mi_commit_mask abstraction
Diffstat (limited to 'include/mimalloc-types.h')
-rw-r--r--include/mimalloc-types.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/mimalloc-types.h b/include/mimalloc-types.h
index 7270f79..06ab1eb 100644
--- a/include/mimalloc-types.h
+++ b/include/mimalloc-types.h
@@ -276,9 +276,11 @@ typedef enum mi_segment_kind_e {
#error "not enough commit bits to cover the segment size"
#endif
-typedef mi_page_t mi_slice_t;
+typedef mi_page_t mi_slice_t;
-typedef int64_t mi_msecs_t;
+typedef int64_t mi_msecs_t;
+
+typedef uintptr_t mi_commit_mask_t;
// Segments are large allocated memory blocks (8mb on 64 bit) from
// the OS. Inside segments we allocated fixed size _pages_ that
@@ -290,8 +292,8 @@ typedef struct mi_segment_s {
bool allow_decommit;
mi_msecs_t decommit_expire;
- uintptr_t decommit_mask;
- uintptr_t commit_mask;
+ mi_commit_mask_t decommit_mask;
+ mi_commit_mask_t commit_mask;
_Atomic(struct mi_segment_s*) abandoned_next;