Modifier | Constructor and Description |
---|---|
protected |
Heap() |
Modifier and Type | Method and Description |
---|---|
abstract void |
attachThread(org.graalvm.nativeimage.IsolateThread isolateThread)
Notifies the heap that a new thread was attached to the VM.
|
abstract org.graalvm.compiler.nodes.gc.BarrierSet |
createBarrierSet(jdk.vm.ci.meta.MetaAccessProvider metaAccess)
Returns a suitable
BarrierSet for the garbage collector that is used for this heap. |
abstract void |
detachThread(org.graalvm.nativeimage.IsolateThread isolateThread)
Notifies the heap that a thread will be detached from the VM.
|
abstract void |
endSafepoint()
Reset the heap to the normal execution state.
|
abstract Reference<?> |
getAndClearReferencePendingList()
Atomically get the list of pending references and clears (resets) it.
|
abstract int |
getClassCount()
Returns the number of classes in the heap.
|
abstract List<Class<?>> |
getClassList()
Return a list of all the classes in the heap.
|
abstract GC |
getGC() |
static Heap |
getHeap() |
abstract int |
getImageHeapOffsetInAddressSpace()
Returns the offset that the image heap should have when mapping the native image file to the
address space in memory.
|
abstract ObjectHeader |
getObjectHeader()
Get the ObjectHeader implementation that this Heap uses.
|
abstract int |
getPreferredAddressSpaceAlignment()
Returns a multiple to which the heap address space should be aligned to at runtime.
|
abstract RuntimeCodeInfoGCSupport |
getRuntimeCodeInfoGCSupport() |
abstract boolean |
hasReferencePendingList()
|
abstract boolean |
isAllocationDisallowed() |
abstract boolean |
isInImageHeap(Object object)
Returns true if the given object is located in the image heap.
|
abstract boolean |
isInImageHeap(org.graalvm.word.Pointer objectPtr)
Returns true if the object at the given address is located in the image heap.
|
abstract void |
prepareForSafepoint()
Prepare the heap for a safepoint.
|
abstract void |
resumeAllocation() |
abstract void |
suspendAllocation() |
abstract boolean |
tearDown()
Tear down the heap and free all allocated virtual memory chunks.
|
abstract void |
waitForReferencePendingList()
Blocks until the heap has pending references.
|
abstract void |
wakeUpReferencePendingListWaiters()
Unblocks any threads in
Heap.waitForReferencePendingList() . |
abstract boolean |
walkCollectedHeapObjects(ObjectVisitor visitor)
Walk all heap objects except the native image heap objects.
|
abstract boolean |
walkImageHeapObjects(ObjectVisitor visitor)
Walk all native image heap objects.
|
abstract boolean |
walkObjects(ObjectVisitor visitor)
Walk all the objects in the heap.
|
public static Heap getHeap()
public abstract void attachThread(org.graalvm.nativeimage.IsolateThread isolateThread)
public abstract void detachThread(org.graalvm.nativeimage.IsolateThread isolateThread)
public abstract void suspendAllocation()
public abstract void resumeAllocation()
public abstract boolean isAllocationDisallowed()
public abstract GC getGC()
public abstract RuntimeCodeInfoGCSupport getRuntimeCodeInfoGCSupport()
public abstract boolean walkObjects(ObjectVisitor visitor)
public abstract boolean walkImageHeapObjects(ObjectVisitor visitor)
public abstract boolean walkCollectedHeapObjects(ObjectVisitor visitor)
public abstract int getClassCount()
public abstract List<Class<?>> getClassList()
public abstract ObjectHeader getObjectHeader()
public abstract boolean tearDown()
public abstract void prepareForSafepoint()
public abstract void endSafepoint()
public abstract org.graalvm.compiler.nodes.gc.BarrierSet createBarrierSet(jdk.vm.ci.meta.MetaAccessProvider metaAccess)
BarrierSet
for the garbage collector that is used for this heap.public abstract int getPreferredAddressSpaceAlignment()
public abstract int getImageHeapOffsetInAddressSpace()
public abstract boolean isInImageHeap(Object object)
public abstract boolean isInImageHeap(org.graalvm.word.Pointer objectPtr)
public abstract boolean hasReferencePendingList()
public abstract void waitForReferencePendingList() throws InterruptedException
InterruptedException
public abstract void wakeUpReferencePendingListWaiters()
Heap.waitForReferencePendingList()
.public abstract Reference<?> getAndClearReferencePendingList()
null
.