RFR: 8365880: Shenandoah: Unify memory usage accounting in ShenandoahFreeSet [v19]

Kelvin Nilsen kdnilsen at openjdk.org
Tue Oct 7 22:00:22 UTC 2025


On Fri, 3 Oct 2025 00:00:25 GMT, William Kemper <wkemper at openjdk.org> wrote:

>> Kelvin Nilsen has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Remove unnecessary methods
>
> src/hotspot/share/gc/shared/gc_globals.hpp line 472:
> 
>> 470:   product(size_t, SoftMaxHeapSize, 0, MANAGEABLE,                           \
>> 471:           "Soft limit for maximum heap size (in bytes)")                    \
>> 472:           constraint(SoftMaxHeapSizeConstraintFunc,AfterMemoryInit)         \
> 
> Changing a common file might raise eyebrows. Why do we need this?

ShenandoahHeap::initialize() makes use of SoftMaxHeapSize.  If the SoftMaxHeapSizeConstraintFunc is handled "after memory init", the value of SoftMaxHeapSize is not yet available when we try to use it.

I welcome an alternative approach if you have any ideas.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26867#discussion_r2412023407


More information about the hotspot-gc-dev mailing list