I have a question about the order of generation to collect. It looks not an important question, but it will be helpful to my clear understanding about the GC.
My Question is:
What order the GC collect generations?
Does it collect from Gen0 to Gen2 or from Gen2 to Gen0?
If the GC collects generations from Gen2 to Gen0, I think it must know the triggered collection is
ephemeral generations or not. If it does, when and how it can know which generation it should collect?
(Of course, assume that it is not triggered by LOH, which always needs a full collection.)
I think it is natural and easy to implement that the GC just collects Gen 0 and decide to collect an older generation or not.
View Complete Post