< prev index next >
agent/src/share/classes/sun/jvm/hotspot/tools/HeapSummary.java
Print this page
@@ -266,12 +266,12 @@
StringStat() {
VM vm = VM.getVM();
SystemDictionary sysDict = vm.getSystemDictionary();
InstanceKlass strKlass = sysDict.getStringKlass();
- // String has a field named 'value' of type 'char[]'.
- stringValueField = (OopField) strKlass.findField("value", "[C");
+ // String has a field named 'value' of type 'byte[]'.
+ stringValueField = (OopField) strKlass.findField("value", "[B");
}
private long stringSize(Instance instance) {
// We include String content in size calculation.
return instance.getObjectSize() +
< prev index next >