-
Enhancement
-
Resolution: Unresolved
-
P4
-
None
With JDK-8048180 G1 got eager reclaim capability for humongous non-typeArrays.
There is currently a small issue with this kind of eager reclaim, that is, if the humongous object references itself outside of the humongous-starts region, g1 will see this as a live reference and not eagerly reclaim that object.
One option is to filter them during determining whether the object is live, which is implemented in the attached patch; this involves quite a few additional checks, so assuming that these self-referential references are rare, this checks seem to be too expensive to even try.
Another way of implementing this check with potentially less memory access, could be using a "block id" in the region attributes instead of a single flag that can be compared to.
At least during concurrent refinement, this situation could be caught and no dirty card emitted.
There is currently a small issue with this kind of eager reclaim, that is, if the humongous object references itself outside of the humongous-starts region, g1 will see this as a live reference and not eagerly reclaim that object.
One option is to filter them during determining whether the object is live, which is implemented in the attached patch; this involves quite a few additional checks, so assuming that these self-referential references are rare, this checks seem to be too expensive to even try.
Another way of implementing this check with potentially less memory access, could be using a "block id" in the region attributes instead of a single flag that can be compared to.
At least during concurrent refinement, this situation could be caught and no dirty card emitted.
- relates to
-
JDK-8048180 G1: Eager reclaim of humongous objects with references
-
- Resolved
-