Currently the PreservedMarksSet and the EvacuationFailureInfo data structures are global to G1CollectedHeap. As such they are completely managed by that class.
However, these data structures are only ever used during young collection if there has been an evacuation failure.
It makes sense to make them local to the (young) collection instead of having them hang around in G1CollectedHeap (and strictly speaking, per-thread EvacuationFailureInfo is never deallocated).
However, these data structures are only ever used during young collection if there has been an evacuation failure.
It makes sense to make them local to the (young) collection instead of having them hang around in G1CollectedHeap (and strictly speaking, per-thread EvacuationFailureInfo is never deallocated).