mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-06 19:38:41 +03:00
byte-precise heap block overflow checking with encoded padding
This commit is contained in:
parent
68112a2751
commit
40f1e1e07b
7 changed files with 138 additions and 50 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue