Permanent Generation:
-Contains the application metadata required by the JVM to describe the classes and methods used in the application. Note that Perm Gen is not part of Java Heap memory.
Method Area:
- Part of space in the Perm Gen and used to store class structure (runtime constants and static variables) and code for methods and constructors
Runtime Constant Pool
-per-class runtime representation of constant pool in a class.
It contains class runtime constants and static methods.
Runtime constant pool is the part of method area.
Memory Pool
-Created by JVM memory managers to create a pool of immutable objects, if implementation supports it
-Memory Pool can belong to Heap or Perm Gen, depending on the JVM memory manager implementation.
Eg. String pool
Young Generation
- where all the new objects are created.
This garbage collection is called Minor GC. Young Generation is divided into three parts – Eden Memory and two Survivor Memory spaces.
Since Young generation keeps short-lived objects, Minor GC is very fast and the application doesn’t get affected by this.
Old Generation:
contains the objects that are long lived and survived after many rounds of Minor GC.
Old Generation Garbage Collection is called -Major GC and usually takes longer time.
Stop the World Event
All the Garbage Collections are “Stop the World” events because all application threads are stopped until the operation completes.
Minor GC is very fast and the application doesn’t get affected by this.
Major GC takes longer time because it checks all the live objects
Perm Gen objects are garbage collected in a full garbage collection.
No comments:
Post a Comment