@@ -2730,22 +2730,23 @@ static bool _collect_alloc_stats(
2730
2730
static void
2731
2731
py_mimalloc_print_stats (FILE * out )
2732
2732
{
2733
- fprintf (out , "Small block threshold = %ld , in %u size classes.\n" ,
2733
+ fprintf (out , "Small block threshold = %zd , in %u size classes.\n" ,
2734
2734
MI_SMALL_OBJ_SIZE_MAX , MI_BIN_HUGE );
2735
- fprintf (out , "Medium block threshold = %ld \n" ,
2735
+ fprintf (out , "Medium block threshold = %zd \n" ,
2736
2736
MI_MEDIUM_OBJ_SIZE_MAX );
2737
- fprintf (out , "Large object max size = %ld \n" ,
2737
+ fprintf (out , "Large object max size = %zd \n" ,
2738
2738
MI_LARGE_OBJ_SIZE_MAX );
2739
2739
2740
2740
mi_heap_t * heap = mi_heap_get_default ();
2741
- struct _alloc_stats stats = {};
2741
+ struct _alloc_stats stats ;
2742
+ memset (& stats , 0 , sizeof (stats ));
2742
2743
mi_heap_visit_blocks (heap , false, & _collect_alloc_stats , & stats );
2743
2744
2744
- fprintf (out , " Allocated Blocks: %ld \n" , stats .allocated_blocks );
2745
- fprintf (out , " Allocated Bytes: %ld \n" , stats .allocated_bytes );
2746
- fprintf (out , " Allocated Bytes w/ Overhead: %ld \n" , stats .allocated_with_overhead );
2747
- fprintf (out , " Bytes Reserved: %ld \n" , stats .bytes_reserved );
2748
- fprintf (out , " Bytes Committed: %ld \n" , stats .bytes_committed );
2745
+ fprintf (out , " Allocated Blocks: %zd \n" , stats .allocated_blocks );
2746
+ fprintf (out , " Allocated Bytes: %zd \n" , stats .allocated_bytes );
2747
+ fprintf (out , " Allocated Bytes w/ Overhead: %zd \n" , stats .allocated_with_overhead );
2748
+ fprintf (out , " Bytes Reserved: %zd \n" , stats .bytes_reserved );
2749
+ fprintf (out , " Bytes Committed: %zd \n" , stats .bytes_committed );
2749
2750
}
2750
2751
#endif
2751
2752
0 commit comments