第22课:通过案例瞬间理解JVM中PSYoungGen、ParOldGen、MetaSpace

内容:

    理解JVM中PSYoungGen、ParOldGen、MetaSpace

一、理解JVM中PSYoungGen、ParOldGen、MetaSpace

Heap
 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回收前后老年代的内存变化
    MetaSpace:JDK1.7中,存储在永久代的部分数据就已经转移到了Java Heap或者是 Native Heap。但永久代仍存在于JDK1.7中,并没完全移除,譬如符号引用(Symbols)转移到了native heap;字面量(interned strings)转移到了java heap;类的静态变量(class statics)转移到了java heap。

你可能感兴趣的:(java,JVM,GC)