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

Kelvin Nilsen kdnilsen at openjdk.org
Tue Apr 30 02:36:28 UTC 2024


On Tue, 23 Apr 2024 15:39:57 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 142:
> 
>> 140: 
>> 141: inline idx_t ShenandoahRegionPartitions::rightmost(ShenandoahFreeSetPartitionId which_partition) const {
>> 142:   assert (int(which_partition) < NumPartitions, "selected free partition must be valid");
> 
> Is the cast needed because NumPartitions is int? You could also make NumPartitions be uintx_8 or make the enum class a intx_8 instead, and avoid some casts? Also seems more natural to have NumPartitions be the same type as the enum.

Good idea.  I've made some refinements as suggested above.

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

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


More information about the shenandoah-dev mailing list