Skip to content

Commit e6238d1

Browse files
christianhaeublpeter-hofer
authored andcommitted
[GR-64819] Keep aligned chunks only for current survivor space objects.
1 parent 1768167 commit e6238d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

substratevm/src/com.oracle.svm.core.genscavenge/src/com/oracle/svm/core/genscavenge/AbstractCollectionPolicy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ public UnsignedWord getMaximumFreeAlignedChunksSize() {
300300
* unaligned chunks are also allocated). We could alternatively return
301301
* getCurrentHeapCapacity() to have chunks ready during full GCs as well.
302302
*/
303-
UnsignedWord total = edenSize.add(survivorSize);
303+
UnsignedWord total = edenSize.add(HeapImpl.getAccounting().getSurvivorUsedBytes());
304304
double alignedFraction = Math.min(1, Math.max(0, avgYoungGenAlignedChunkFraction.getAverage()));
305305
return UnsignedUtils.fromDouble(UnsignedUtils.toDouble(total) * alignedFraction);
306306
}

0 commit comments

Comments
 (0)