use of com.oracle.svm.core.util.HostedByteBufferPointer in project graal by oracle.
the class AlignedChunkRememberedSet method enableRememberedSet.
@Platforms(Platform.HOSTED_ONLY.class)
public static void enableRememberedSet(HostedByteBufferPointer chunk, int chunkPosition, List<ImageHeapObject> objects) {
// Completely clean the card table and the first object table.
CardTable.cleanTable(getCardTableStart(chunk), getCardTableSize());
FirstObjectTable.initializeTable(getFirstObjectTableStart(chunk), getFirstObjectTableSize());
Pointer fotStart = getFirstObjectTableStart(chunk);
UnsignedWord objectsStartOffset = AlignedHeapChunk.getObjectsStartOffset();
for (ImageHeapObject obj : objects) {
long offsetWithinChunk = obj.getOffset() - chunkPosition;
assert offsetWithinChunk > 0 && WordFactory.unsigned(offsetWithinChunk).aboveOrEqual(objectsStartOffset);
UnsignedWord startOffset = WordFactory.unsigned(offsetWithinChunk).subtract(objectsStartOffset);
UnsignedWord endOffset = startOffset.add(WordFactory.unsigned(obj.getSize()));
FirstObjectTable.setTableForObject(fotStart, startOffset, endOffset);
// The remembered set bit in the header will be set by the code that writes the objects.
}
}
use of com.oracle.svm.core.util.HostedByteBufferPointer in project graal by oracle.
the class HostedImageHeapChunkWriter method enableRememberedSetForUnalignedChunk.
@Override
public void enableRememberedSetForUnalignedChunk(int chunkPosition) {
int chunkOffset = getChunkOffsetInBuffer(chunkPosition);
rememberedSet.enableRememberedSetForUnalignedChunk(new HostedByteBufferPointer(buffer, chunkOffset));
}
use of com.oracle.svm.core.util.HostedByteBufferPointer in project graal by oracle.
the class HostedImageHeapChunkWriter method enableRememberedSetForAlignedChunk.
@Override
public void enableRememberedSetForAlignedChunk(int chunkPosition, List<ImageHeapObject> objects) {
int chunkOffset = getChunkOffsetInBuffer(chunkPosition);
rememberedSet.enableRememberedSetForAlignedChunk(new HostedByteBufferPointer(buffer, chunkOffset), chunkPosition, objects);
}
Aggregations