Peter Duniho
1/21/2010 5:15:00 PM
Jon Harrop wrote:
> Peter Duniho wrote:
>> Frankly, given that the main advantage of generational GC is to reduce
>> the cost of the object graph traversal, I would guess that any
>> generational GC would rely on this type of hardware feature. Otherwise,
>> it's not clear to me what other benefits a generational GC would confer
>> that would justify the additional complexity.
>
> Efficient recycling of short-lived values.
True. I overlooked the fact that since compaction requires copying
object data, the fewer objects that are involved in a compaction
operation, the better the performance.
Nevertheless, there is in fact at least one GC implementation I know of
where avoiding traversing objects is another benefit, and it would
surprise me if Java's GC doesn't also take advantage of that opportunity
as well.
Pete