RFR: 8373335: Serial: Clean up SerialHeap members by access specifies

Joel Sikström jsikstro at openjdk.org
Tue Dec 9 09:35:56 UTC 2025


On Tue, 9 Dec 2025 09:08:55 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

> Trivial moving member of `SerialHeap` so that all `private` fields/methods are altogether (at the top).
>  
> Test: tier1

Changes look good. Some comments while looking at this:

`save_marks` was public and is now private, which is fine since it is only called internally.

These two member variables are not initialized in the constructor like all other member variables:

HeapWord* _young_gen_saved_top;
HeapWord* _old_gen_saved_top;


The implementation order for most methods in serialHeap.cpp is quite different from the declaration/definition order in serialHeap.hpp, which is something we might also want to fix.

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

Marked as reviewed by jsikstro (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/28718#pullrequestreview-3556359446


More information about the hotspot-gc-dev mailing list