mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-09 16:59:32 +03:00
fix padding check and set default extra padding to 0
This commit is contained in:
parent
2e175c1221
commit
6b6a8a2315
2 changed files with 2 additions and 2 deletions
|
@ -273,7 +273,7 @@ typedef struct mi_segment_s {
|
|||
// In debug mode there is a padding stucture at the end
|
||||
// of the blocks to check for buffer overflows.
|
||||
// ------------------------------------------------------
|
||||
#if defined(MI_PADDING)
|
||||
#if (MI_PADDING)
|
||||
typedef struct mi_padding_s {
|
||||
uint32_t canary; // encoded block value to check validity of the padding (in case of heap block overflow)
|
||||
uint32_t delta; // padding bytes before the block. (mi_usable_size(p) - delta == exact allocated bytes)
|
||||
|
|
|
@ -77,7 +77,7 @@ static mi_option_desc_t options[_mi_option_last] =
|
|||
#endif
|
||||
{ 100, UNINIT, MI_OPTION(reset_delay) }, // reset delay in milli-seconds
|
||||
{ 0, UNINIT, MI_OPTION(use_numa_nodes) }, // 0 = use available numa nodes, otherwise use at most N nodes.
|
||||
{ 160, UNINIT, MI_OPTION(debug_extra_padding) }, // extra padding in bytes
|
||||
{ 0, UNINIT, MI_OPTION(debug_extra_padding) }, // extra padding in bytes
|
||||
{ 100, UNINIT, MI_OPTION(os_tag) }, // only apple specific for now but might serve more or less related purpose
|
||||
{ 16, UNINIT, MI_OPTION(max_errors) } // maximum errors that are output
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue