Generational Garbage Collection とは?
generational garbage collection は、heap をオブジェクトの年齢で世代に分け、最も若い世代を頻繁に回収し、古い世代はまれにしか走査しません。ほとんどのオブジェクトは若くして死ぬという観察を利用し、新しい割り当てに労力を集中することで、大半のゴミを安価に回収します。複数回の回収を生き延びたオブジェクトは、より古い世代へ昇格されます。
なぜ重要か
回収を短命なオブジェクトに集中させると、毎回 heap 全体を走査するのに比べて一時停止が小さく throughput が高く保たれます。ほとんどのマネージドランタイムの collector における標準的な設計です。
関連ガイド
What Is Mark and Sweep?Mark and sweep is a garbage collection algorithm that marks all reachable objects, then sweeps away the unmar…
What Is Reference Counting?Reference counting tracks how many references point to an object and frees it automatically when that count d…
What Is an Arena Allocator?An arena allocator carves allocations from one big region and frees them all at once when the arena is reset,…