|
|
|
|
|
by fmstephe
3317 days ago
|
|
Can you expand on "Also, the generational hypothesis has nothing to do with whether compaction is profitable. These are orthogonal things." It is my understanding that these two are strongly linked, at least in practice. The generational hypothesis states that most (even overwhelmingly most) allocations are unreachable very quickly. So we employ moving/compacting collectors so that we no longer need to sweep all those dead allocations. These dead allocations are freed at no cost and we only pay for copying the live set. Having written that, it occurs to me that the sentence I quote read oddly to me because I conflated 'compaction' with 'moving'. Happy to be corrected on anything written above. |
|
It’s true that those generational GCs that copy objects also sometimes use the address of the object to track the object’s generation. JSC’s GC uses a GC state byte in the object header to tell which generation an object is in.