Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

In relation to the Java heap, the terms young, old, and permanent generations refer to the different areas or regions of memory where objects are stored.

The Young Generation is where new objects are allocated and short-lived objects are stored. It is further divided into the Eden space and two survivor spaces. Objects that survive multiple garbage collection cycles are promoted to the Old Generation.

The Old Generation is where long-lived or tenured objects are stored. These are objects that have survived garbage collection cycles in the Young Generation. The Old Generation is also known as the Tenured Generation.

The Permanent Generation was used in older versions of Java, and it contained metadata related to class definitions, method definitions, and other internal JVM structures. In newer versions of Java, the Permanent Generation has been replaced with the Metaspace which is not a part of the heap.