Integrated: 8361948: Shenandoah: region free capacity unit mismatch

Xiaolong Peng xpeng at openjdk.org
Fri Jul 11 20:12:47 UTC 2025


On Fri, 11 Jul 2025 07:12:31 GMT, Xiaolong Peng <xpeng at openjdk.org> wrote:

> In the code path of [mutator allocation](https://github.com/openjdk/jdk/blob/master/src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp#L883
> ), looks like we assume that ShenandoahAllocRequest::size/min_size and region free capacity have same unit, which is apparently not right, unit used in ShenandoahAllocRequest is word but region free capacity is in bytes.
> 
> It should be just one line change like:
> 
> if (alloc_capacity(r) >= min_size * HeapWordSize) {
>    ...
> }
> 
> 
> 
> ### Test
> - [x] make test TEST=hotspot_gc_shenandoah

This pull request has now been integrated.

Changeset: 46988e10
Author:    Xiaolong Peng <xpeng at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/46988e1073e9a2b47491c90143b1f261fe56da56
Stats:     1 line in 1 file changed: 0 ins; 0 del; 1 mod

8361948: Shenandoah: region free capacity unit mismatch

Reviewed-by: shade, wkemper

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

PR: https://git.openjdk.org/jdk/pull/26259


More information about the shenandoah-dev mailing list