Java Reference
In-Depth Information
mostly garbage and only spend a little bit of time emptying those regions. This ap-
proach—clearing out only the mostly garbage regions—is what gives G1 its name: Garbage
First.
That doesn't apply to the regions in the young generation: during a young GC, the entire
young generation is either freed or promoted (to a survivor space or to the old generation).
Still, the young generation is defined in terms of regions, in part because it makes resizing
the generations much easier if the regions are predefined.
G1 has four main operations:
▪ A young collection
▪ A background, concurrent cycle
▪ A mixed collection
▪ If necessary, a full GC
We'll look at each of those in turn, starting with the G1 young collection shown in Fig-
ure 6-6 .
Search WWH ::




Custom Search