Generational garbage collection

Generational GC is the practice of splitting the heap into two or more regions, or generations. Objects are allocated in a "young generation" or "nursery" that is typically smaller than the main part of the heap. The nursery is frequently garbage collected, and because of its small size, this is quicker than garbage collecting the "old space". Given that most objects are temporary in nature and die young, generational GC is a good memory management optimization. However, generational GC usually adds some kind of overhead for write barriers, which are needed to keep track of references from the old space to the nursery during nursery GC.

See also Nursery, Old space, Young space, and Write barrier.

Get Oracle JRockit now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.