mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-09-18 12:14:47 +03:00
enforce first null byte in CANARY
+ added MI_CANARY_MASK to enforce the LSB is 0
This commit is contained in:
parent
3cba10e510
commit
eaafec4461
2 changed files with 2 additions and 1 deletions
|
@ -472,6 +472,7 @@ typedef struct mi_padding_s {
|
|||
uint32_t canary; // encoded block value to check validity of the padding (in case of overflow)
|
||||
uint32_t delta; // padding bytes before the block. (mi_usable_size(p) - delta == exact allocated bytes)
|
||||
} mi_padding_t;
|
||||
#define MI_CANARY_MASK (0xffffff00)
|
||||
#define MI_PADDING_SIZE (sizeof(mi_padding_t))
|
||||
#define MI_PADDING_WSIZE ((MI_PADDING_SIZE + MI_INTPTR_SIZE - 1) / MI_INTPTR_SIZE)
|
||||
#else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue