-
Bug
-
Resolution: Fixed
-
P4
-
None
-
master
-
generic
-
generic
In the code path of mutator allocation, 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 here:
https://github.com/openjdk/jdk/blob/master/src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp#L883
Correct code should be like:
```
if (alloc_capacity(r) >= min_size * HeapWordSize) {
...
}
```
In theory, the bug should cause less efficient code in memory allocation, even cause more waste in the worse case.
It should be just one line change here:
https://github.com/openjdk/jdk/blob/master/src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp#L883
Correct code should be like:
```
if (alloc_capacity(r) >= min_size * HeapWordSize) {
...
}
```
In theory, the bug should cause less efficient code in memory allocation, even cause more waste in the worse case.
- links to
-
Commit(master) openjdk/jdk/46988e10
-
Review(master) openjdk/jdk/26259