November 2018
Intermediate to advanced
388 pages
9h 5m
English
In the Java memory model, the heap memory is divided into a young generation and old generation. The old generation is also known as tenured:

The young generation consists of Eden and Survivor spaces (S0 and S1) and takes up about 40% of the heap memory, while the Old Generation takes up about 60% of the memory.
When the program creates an object, it is created in the Eden space first. When the Eden space is filled up, the partial GC runs, marks the objects that are still referenced, and cleans up the objects in the young generation that are no longer reachable by the program. The following diagram depicts this:
The objects that ...
Read now
Unlock full access