RFR: 8324649: Shenandoah: replace implementation of free set [v14]
Kelvin Nilsen
kdnilsen at openjdk.org
Mon May 13 21:20:14 UTC 2024
On Wed, 10 Apr 2024 11:44:12 GMT, Roman Kennke <rkennke at openjdk.org> wrote:
>> I'm going to add the following comment at the top of shenandoahFreeSet.hpp:
>>
>> // The API and internal implementation of ShenandoahSimpleBitMap and ShenandoahRegionPartitions use ssize_t to
>> // represent index, even though index is "inherently" unsigned. There are two reasons for this choice:
>> // 1. We use -1 as a sentinel value to represent empty partitions. This same value may be used to represent
>> // failure to find a previous set bit or previous range of set bits.
>> // 2. Certain loops are written most naturally if the iterator, which may hold the sentinel -1 value, can be
>> // declared as signed and the terminating condition can be < 0.
>
> Please use types, method signatures and keep structure similar to bitMap.hpp, which use idx_t, which is a size_t (see e.g. BitMap::count_one_bits()).
I am using idx_t, defined here to be ssize_t, as discussed in comments.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17561#discussion_r1599095492
More information about the hotspot-gc-dev
mailing list