]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
memcheck/tests/mallinfo2.c use %zu to print mallinfo2 fields
authorMark Wielaard <mark@klomp.org>
Thu, 31 Jul 2025 16:34:31 +0000 (18:34 +0200)
committerMark Wielaard <mark@klomp.org>
Thu, 31 Jul 2025 16:34:31 +0000 (18:34 +0200)
memcheck/tests/mallinfo2.c

index 23667a5b1d7c60017bb423e5088a795a8fecd93d..8cdaa789e61d682fe5c890dcf70b235c9f7621f1 100644 (file)
@@ -18,16 +18,16 @@ static size_t check(size_t min, size_t max)
 
   if (! s_quiet)
   {
-    printf("arena = %d\n", mi.arena);      /* non-mmapped space allocated from system */
-    printf("ordblks = %d\n", mi.ordblks);   /* number of free chunks */
-    printf("smblks = %d\n", mi.smblks);            /* number of fastbin blocks */
-    printf("hblks = %d\n", mi.hblks);      /* number of mmapped regions */
-    printf("hblkhd = %d\n", mi.hblkhd);            /* space in mmapped regions */
-    printf("usmblks = %d\n", mi.usmblks);   /* maximum total allocated space */
-    printf("fsmblks = %d\n", mi.fsmblks);   /* space available in freed fastbin blocks */
-    printf("uordblks = %d\n", mi.uordblks); /* total allocated space */
-    printf("fordblks = %d\n", mi.fordblks); /* total free space */
-    printf("keepcost = %d\n", mi.keepcost); /* top-most, releasable (via malloc_trim) space */
+    printf("arena = %zu\n", mi.arena);     /* non-mmapped space allocated from system */
+    printf("ordblks = %zu\n", mi.ordblks);   /* number of free chunks */
+    printf("smblks = %zu\n", mi.smblks);           /* number of fastbin blocks */
+    printf("hblks = %zu\n", mi.hblks);     /* number of mmapped regions */
+    printf("hblkhd = %zu\n", mi.hblkhd);           /* space in mmapped regions */
+    printf("usmblks = %zu\n", mi.usmblks);   /* maximum total allocated space */
+    printf("fsmblks = %zu\n", mi.fsmblks);   /* space available in freed fastbin blocks */
+    printf("uordblks = %zu\n", mi.uordblks); /* total allocated space */
+    printf("fordblks = %zu\n", mi.fordblks); /* total free space */
+    printf("keepcost = %zu\n", mi.keepcost); /* top-most, releasable (via malloc_trim) space */
     printf("(min = %zu, max = %zu)\n", min, max);
     printf("\n");
   }