jmap -histo pid 输出的[C [B [I [S methodKlass constantPoolKlass含义

 

Heap Histogram

All Classes (excluding platform)

Class Instance Count Total Size
class [I 10295 74101376
class [B 37484 20206389
class [C 77031 9857592
class [Ljava.lang.Object; 18232 1935080
class java.lang.String 70031 1400620
class [Ljava.util.HashMap$Entry; 7156 1344856
class java.lang.reflect.Method 6986 901194
class java.util.HashMap$Entry 25634 717752
class java.lang.Class 4535 653040
class [S 9082 617178
class java.nio.HeapByteBuffer 9998 389922
class java.nio.HeapCharBuffer 9736 360232
class [Ljava.lang.String; 4306 330664
class java.util.HashMap 6454 309792
class java.lang.reflect.Field 2181 229005
class [Ljava.util.Hashtable$Entry; 644 185440
class [Ljava.lang.Class;

 

 

其中:

 

[C is a char[]
[S is a short[]
[I is a int[]
[B is a byte[]
[[I is a int[][]

 

上面的输出中[C对象占用Heap这么多,往往跟String有关,String其内部使用final char[]数组来保存数据的。

 

constMethodKlass/ methodKlass/ constantPoolKlass/ constantPoolCacheKlass/ instanceKlassKlass/ methodDataKlass

与Classloader相关,常驻与Perm区。

 

 

 

 

你可能感兴趣的:(method)