Ask Your Question
0

What are the meanings of the terms young, old, and permanent generations in relation to the Java heap?

asked 2022-09-26 11:00:00 +0000

nofretete gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2022-04-14 07:00:00 +0000

lakamha gravatar image

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-09-26 11:00:00 +0000

Seen: 9 times

Last updated: Apr 14 '22