diff --git a/Objects/obmalloc.c b/Objects/obmalloc.c index d230bbdad3c4cf..b05273b09126eb 100644 --- a/Objects/obmalloc.c +++ b/Objects/obmalloc.c @@ -2738,7 +2738,8 @@ py_mimalloc_print_stats(FILE *out) MI_LARGE_OBJ_SIZE_MAX); mi_heap_t *heap = mi_heap_get_default(); - struct _alloc_stats stats = {}; + struct _alloc_stats stats; + memset(&stats, 0, sizeof(stats)); mi_heap_visit_blocks(heap, false, &_collect_alloc_stats, &stats); fprintf(out, " Allocated Blocks: %ld\n", stats.allocated_blocks); diff --git a/PC/pyconfig.h b/PC/pyconfig.h index ac20129cd30fcc..e6b368caffe280 100644 --- a/PC/pyconfig.h +++ b/PC/pyconfig.h @@ -511,6 +511,9 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */ /* Use Python's own small-block memory-allocator. */ #define WITH_PYMALLOC 1 +/* Define if you want to compile in mimalloc memory allocator. */ +#define WITH_MIMALLOC 1 + /* Define if you want to compile in object freelists optimization */ #define WITH_FREELISTS 1