SUGGESTED FIX
------- heapInspection.cpp -------
55,57c55,58
< st->print_cr("%9d %9d %s",
< _instance_count,
< _instance_words * HeapWordSize,
---
> // simplify the formatting (ILP32 vs LP64) - always cast the numbers to 64-bit
> st->print_cr("%13" FORMAT64_MODIFIER "d %13" FORMAT64_MODIFIER "u %s",
> (jlong) _instance_count,
> (julong) _instance_words * HeapWordSize,
157,158c158,160
< jint total = 0;
< size_t totalw = 0;
---
> // simplify the formatting (ILP32 vs LP64) - store the sum in 64-bit
> jlong total = 0;
> julong totalw = 0;
160c162
< st->print("%3d: ", i+1);
---
> st->print("%4d: ", i+1);
165c167,168
< st->print_cr("Total %8d %9d", total, totalw * HeapWordSize);
---
> st->print_cr("Total %13" FORMAT64_MODIFIER "d %13" FORMAT64_MODIFIER "u",
> total, totalw * HeapWordSize);
224,225c227,228
< "num #instances #bytes class name\n"
< "--------------------------------------",
---
> " num #instances #bytes class name\n"
> "----------------------------------------------",
|