Survival full, does Tenured generation GC run?

Survival full, does Tenured generation GC run?



I am trying to understand how Java GC works. Let assume that due to an allocation request, the Eden space is full. Minor GC happens, collecting all Eden and Survival1 objects into Survival2. But there are more objects than space in Survival2. As far as I understand, when this happens, the spillover is moved to the Tenured space (prematurly?—as in, before the predefined number of GC iterations that an object is supposed to stay in the Young space). Does such an event also trigger a GC for the Tenured space if the Tenured space has enough space for the spillover?



I'm not considering the G1 garbage collection here.




1 Answer
1



Your assumption about how the survivor spaces work is correct. If the 'to' survivor space does not have enough space for objects being copied from the 'from' space plus those that have been collected from Eden, objects will be prematurely promoted (before the tenuring threshold has been reached) to the old generation.



The old gen. is separate so a GC will only be triggered if the objects being promoted from the Young gen. cause it. With algorithms like CMS and G1, they use values like the occupancy fraction to decide when to initiate GC. GC of the old gen. may be triggered if there is still enough space for the promotion but it's not a certainty.






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Edmonton

Crossroads (UK TV series)