RFR: 8324649: Shenandoah: refactor implementation of free set [v4]
Y. Srinivas Ramakrishna
ysr at openjdk.org
Sat Feb 3 08:55:07 UTC 2024
On Wed, 31 Jan 2024 00:45:20 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:
>> src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp line 401:
>>
>>> 399:
>>> 400: HeapWord* ShenandoahFreeSet::allocate_single(ShenandoahAllocRequest& req, bool& in_new_region) {
>>> 401: shenandoah_assert_heaplocked();
>>
>> In addition, another precondition for this method appears to be that req.size() <= humongous size threshold. Perhaps that check should also be disposed of here. (Based on the documentation at the previous review comment above.)
>
> Added similar documentation here. Thanks.
I meant something like:
assert(req.size() <= ShenandoahHeapRegion::humongous_threshold_words(), "Can't exceed humongous size");
Unless the precondition is that it shouldn't exceed a region's worth in size, in which case: `<= ShenandoahHeapRegion::region_size_words().`
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17561#discussion_r1476987025
More information about the shenandoah-dev
mailing list