]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Compute total size with unsigned long long
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Wed, 6 May 2015 21:24:23 +0000 (21:24 +0000)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Wed, 6 May 2015 21:24:23 +0000 (21:24 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15189

perf/memrw.c

index 2d9e93ad6080ac1c7cff2c228bc9a2c0c17a5b94..10b95989c99af9e5eba35fabb532b861361e7c05 100644 (file)
@@ -106,10 +106,12 @@ int main (int argc, char *argv[])
 
    nr_thr = 1;
 
-   printf ("total program memory -t %d MB"
-           " working set -w %d MB\n",
-           (nr_b * sz_b) / (1024*1024),
-           (nr_b_ws * sz_b) / (1024*1024));
+   printf ("total program memory -t %llu MB"
+           " working set -w %llu MB\n",
+           ((unsigned long long)nr_b * sz_b) 
+             / (unsigned long long) (1024*1024),
+           ((unsigned long long)nr_b_ws * sz_b) 
+             / (unsigned long long)(1024*1024));
    printf (" working set R or W -l %d times"
            " repeat the whole stuff -r %d times\n",
            nr_loops,