summaryrefslogtreecommitdiff
path: root/include/mimalloc-internal.h
diff options
context:
space:
mode:
authordaan <daanl@outlook.com>2020-01-31 23:39:51 -0800
committerdaan <daanl@outlook.com>2020-01-31 23:39:51 -0800
commit40f1e1e07b9452ad46ae47dfb3887e7f5cb6ca4d (patch)
tree342045bcad9211ecd3f8fc1d304356388b863391 /include/mimalloc-internal.h
parent68112a2751d4b4388d91381fce3afb79e3c00eec (diff)
byte-precise heap block overflow checking with encoded padding
Diffstat (limited to 'include/mimalloc-internal.h')
-rw-r--r--include/mimalloc-internal.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/mimalloc-internal.h b/include/mimalloc-internal.h
index 2c8d767..be10bdc 100644
--- a/include/mimalloc-internal.h
+++ b/include/mimalloc-internal.h
@@ -377,7 +377,8 @@ static inline size_t mi_page_block_size(const mi_page_t* page) {
}
}
-// Get the client usable block size of a page (without padding etc)
+// Get the usable block size of a page without fixed padding.
+// This may still include internal padding due to alignment and rounding up size classes.
static inline size_t mi_page_usable_block_size(const mi_page_t* page) {
return mi_page_block_size(page) - MI_PADDING_SIZE;
}