merge from dev
This commit is contained in:
@@ -1579,9 +1579,12 @@ void _mi_segment_huge_page_reset(mi_segment_t* segment, mi_page_t* page, mi_bloc
|
||||
mi_assert_internal(page->used == 1); // this is called just before the free
|
||||
mi_assert_internal(page->free == NULL);
|
||||
if (segment->allow_decommit) {
|
||||
const size_t csize = mi_usable_size(block) - sizeof(mi_block_t);
|
||||
uint8_t* p = (uint8_t*)block + sizeof(mi_block_t);
|
||||
_mi_os_reset(p, csize, &_mi_stats_main); // note: cannot use segment_decommit on huge segments
|
||||
size_t csize = mi_usable_size(block);
|
||||
if (csize > sizeof(mi_block_t)) {
|
||||
csize = csize - sizeof(mi_block_t);
|
||||
uint8_t* p = (uint8_t*)block + sizeof(mi_block_t);
|
||||
_mi_os_reset(p, csize, &_mi_stats_main); // note: cannot use segment_decommit on huge segments
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user