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:59:52 GMT, Roman Kennke <rkennke at openjdk.org> wrote:

>> 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.

Thanks.  I'm ok with current form.

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

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


More information about the shenandoah-dev mailing list