RFR: 8324649: Shenandoah: refactor implementation of free set [v6]

Kelvin Nilsen kdnilsen at openjdk.org
Sat Feb 3 16:42:05 UTC 2024


On Sat, 3 Feb 2024 08:23:06 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:

>> Kelvin Nilsen has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Rename and comments for _capacity_of and _used_by
>
> src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp line 441:
> 
>> 439:       // size_t is unsigned, need to dodge underflow when _leftmost = 0
>> 440:       // Fast-path: try to allocate in the collector view first
>> 441:       for (size_t c = _partitions.rightmost(Collector) + 1; c > _partitions.leftmost(Collector); c--) {
> 
> Use `ssize_t` for c.

Thanks.  Done.

> src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp line 457:
> 
>> 455: 
>> 456:       // Try to steal an empty region from the mutator view.
>> 457:       for (size_t c = _partitions.rightmost_empty(Mutator) + 1; c > _partitions.leftmost_empty(Mutator); c--) {
> 
> `ssize_t` to keep all these loops uniform.

Agree.  Done.

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

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


More information about the shenandoah-dev mailing list