The Java Heap consists of three regions:
- New/Young Region: This region is where all new objects are created. This region is divided into three sub-spaces: Eden, Survivor 0, and Survivor 1. This region has the ability to dynamically resize its virtual space.
- Old/Tenured Region: This region is where objects are placed when the New region overflows or an object is tenured because it has an extended life. Objects can be removed from the Old region during a full garbage collection.
- Permanent Region: This region holds the JVM’s class and method objects and often remains unchanged. This region lives outside the heap, and separate memory is allocated for it.