Skip to content

Commit 42ffd7b

Browse files
committed
[GR-75897] Reset aligned chunk pin count on initialization
PullRequest: graal/24191
2 parents c8f77f7 + c151d9e commit 42ffd7b

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2026, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -86,6 +86,9 @@ public interface AlignedHeader extends HeapChunk.Header<AlignedHeader> {
8686
@RawField
8787
int getObjectPinCount();
8888

89+
@RawField
90+
void setObjectPinCount(int value);
91+
8992
@RawFieldAddress
9093
Pointer addressOfObjectPinCount();
9194

@@ -101,6 +104,7 @@ public static void initialize(AlignedHeader chunk, UnsignedWord chunkSize) {
101104
assert chunk.isNonNull();
102105
assert chunkSize.equal(HeapParameters.getAlignedHeapChunkSize()) : "expecting all aligned chunks to be the same size";
103106
HeapChunk.initialize(chunk, AlignedHeapChunk.getObjectsStart(chunk), chunkSize);
107+
chunk.setObjectPinCount(0);
104108
chunk.setSweep(false);
105109
}
106110

0 commit comments

Comments
 (0)