Skip to content

Commit d9f6ab5

Browse files
committed
comments
1 parent f76a678 commit d9f6ab5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/alloc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ extern inline void* _mi_page_malloc(mi_heap_t* heap, mi_page_t* page, size_t siz
3737
page->free = mi_block_next(page, block);
3838
mi_assert_internal(page->free == NULL || _mi_ptr_page(page->free) == page);
3939

40-
// zero the block?
40+
// zero the block? note: we need to zero the full block size (issue #63)
4141
if mi_unlikely(zero) {
42-
mi_assert_internal(page->xblock_size != 0); // do not call with zero'ing for huge blocks
42+
mi_assert_internal(page->xblock_size != 0); // do not call with zero'ing for huge blocks (see _mi_malloc_generic)
4343
const size_t zsize = (page->is_zero ? sizeof(block->next) : page->xblock_size);
4444
_mi_memzero_aligned(block, zsize);
4545
}

0 commit comments

Comments
 (0)