RFR: 8303467: Serial: Refactor reference processor

Thomas Schatzl tschatzl at openjdk.org
Fri Mar 3 15:09:04 UTC 2023


On Fri, 3 Mar 2023 13:52:25 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

> Please put this static into the class as static class member; it's very hard to track if statics are put into random places. 

This refers to the `AlwaysTrueClosure`.

>Why we can use `AlwaysTrueClosure` here should probably be documented.

Something like: "Mark&Sweep collection covers the whole heap so all objects should be subject to discovery"

>The reference processor for `MarkSweep` can also be a static, as well as `MarkAndPushClosure` initialized statically with that reference processor.

Here I ommitted the important part: `_ref_processor` does not need to be a reference/pointer any more and we can get rid of the new/delete (I think).

-------------

PR: https://git.openjdk.org/jdk/pull/12809


More information about the hotspot-gc-dev mailing list