mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-12 22:24:58 +03:00
fix commit zero on windows
This commit is contained in:
parent
d1bd1644d5
commit
739d11313c
3 changed files with 14 additions and 7 deletions
|
@ -97,8 +97,8 @@ void _mi_block_zero_init(void* p, size_t size) {
|
|||
if (page->flags.is_zero) {
|
||||
((mi_block_t*)p)->next = 0;
|
||||
#if MI_DEBUG>0
|
||||
for (size_t i = 0; i < size; i++) {
|
||||
if (((uint8_t*)p)[i] != 0) {
|
||||
for (size_t i = 0; i < (page->block_size/sizeof(uintptr_t)); i++) {
|
||||
if (((uintptr_t*)p)[i] != 0) {
|
||||
_mi_assert_fail("page not zero", __FILE__, __LINE__, "_mi_block_zero_init");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue