RFR: 8259778: Merge MutableSpace and ImmutableSpace

Thomas Schatzl tschatzl at openjdk.java.net
Thu Jan 28 09:09:41 UTC 2021


On Thu, 28 Jan 2021 05:13:57 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Please review this change which merges ImmutableSpace into MutableSpace,
>> eliminating the former.  There were no interesting uses of ImmutableSpace,
>> other than as the base class for MutableSpace.  The name ImmutableSpace is
>> kind of a misnomer given that usage.
>> 
>> Testing:
>> mach5 tier1-3
>
> src/hotspot/share/gc/parallel/mutableSpace.hpp line 47:
> 
>> 45: //
>> 46: // Invariant: bottom() <= top() <= end()
>> 47: // top() is inclusive and end() is exclusive.
> 
> If end() is exclusive then shouldn't the invariant be `< end()`?

I also think that top() is also exclusive as in other collectors.

@dholmes-ora : e.g. bottom == top == end means the space is empty. These two lines are not disagreeing with each other.

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

PR: https://git.openjdk.java.net/jdk/pull/2271


More information about the serviceability-dev mailing list