內(nèi)容:
理解JVM中PSYoungGen、ParOldGen、MetaSpace
一、理解JVM中PSYoungGen、ParOldGen、MetaSpace
PSYoungGen total 2560K, used 2505K [0x00000000ffd00000, 0x0000000100000000, 0x0000000100000000) eden space 2048K, 98% used [0x00000000ffd00000,0x00000000ffef64d8,0x00000000fff00000) from space 512K, 97% used [0x00000000fff00000,0x00000000fff7c2f0,0x00000000fff80000) to space 512K, 0% used [0x00000000fff80000,0x00000000fff80000,0x0000000100000000) ParOldGen total 7168K, used 1196K [0x00000000ff600000, 0x00000000ffd00000, 0x00000000ffd00000) object space 7168K, 16% used [0x00000000ff600000,0x00000000ff72b180,0x00000000ffd00000) Metaspace used 3377K, capacity 4496K, committed 4864K, reserved 1056768K class space used 352K, capacity 388K, committed 512K, reserved 1048576K
PSYoungGen:GC日志中的PSYoungGen(PS是指Parallel Scavenge)為Eden+FromSpace,而整個YoungGeneration為Eden+FromSpace+ToSpace。
ParOldGen:ParOldGen表示gc回收前后老年代的內(nèi)存變化
MetaSpace:JDK1.7中,存儲在永久代的部分?jǐn)?shù)據(jù)就已經(jīng)轉(zhuǎn)移到了Java Heap或者是 Native Heap。但永久代仍存在于JDK1.7中,并沒完全移除,譬如符號引用(Symbols)轉(zhuǎn)移到了native heap;字面量(interned strings)轉(zhuǎn)移到了java heap;類的靜態(tài)變量(class statics)轉(zhuǎn)移到了java heap。
|