RFR: 8324649: Shenandoah: replace implementation of free set [v45]

Roman Kennke rkennke at openjdk.org
Tue Apr 23 17:33:44 UTC 2024


On Tue, 23 Apr 2024 15:59:16 GMT, Roman Kennke <rkennke at openjdk.org> wrote:

>> Kelvin Nilsen has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fix typo
>
> src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp line 164:
> 
>> 162:                                                      idx_t mutator_leftmost_empty, idx_t mutator_rightmost_empty,
>> 163:                                                      size_t mutator_region_count, size_t mutator_used) {
>> 164:   _region_counts[int(ShenandoahFreeSetPartitionId::Mutator)] = mutator_region_count;
> 
> uhh all those casts are kinda ugly. I wasn't aware that this is necessary when I suggested enum classes. But, afaict, this is the least intrusive way to use the enum as indices, short of going back to C-style-enums. Too bad (and sorry).

maybe it'd indeed be cleaner to just use C-style-enums. I leave that up to you.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17561#discussion_r1576511605


More information about the shenandoah-dev mailing list