Skip to content

Commit 7ff8427

Browse files
committed
Fix py_mimalloc_print_stats()
1 parent 75d1414 commit 7ff8427

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Objects/obmalloc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2738,7 +2738,8 @@ py_mimalloc_print_stats(FILE *out)
27382738
MI_LARGE_OBJ_SIZE_MAX);
27392739

27402740
mi_heap_t *heap = mi_heap_get_default();
2741-
struct _alloc_stats stats = {};
2741+
struct _alloc_stats stats;
2742+
memset(&stats, 0, sizeof(stats));
27422743
mi_heap_visit_blocks(heap, false, &_collect_alloc_stats, &stats);
27432744

27442745
fprintf(out, " Allocated Blocks: %ld\n", stats.allocated_blocks);

0 commit comments

Comments
 (0)