| 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.
|
protected abstract List<Class<?>> |
getAllClasses()
Get all known classes.
|
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 (initialized as well as uninitialized).
|
abstract GC |
getGC() |
static Heap |
getHeap() |
abstract int |
getImageHeapNullRegionSize()
Returns the number of null bytes that should be prepended to the image heap during the image
build.
|
abstract int |
getImageHeapOffsetInAddressSpace()
Returns an offset relative to the heap base, at which the image heap should be mapped into
the address space.
|
List<Class<?>> |
getLoadedClasses()
Returns all loaded classes in the heap (see
PredefinedClassesSupport). |
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 boolean |
isInPrimaryImageHeap(Object object)
Whether the object is in the primary image heap, as opposed to an auxiliary image heap.
|
abstract boolean |
isInPrimaryImageHeap(org.graalvm.word.Pointer objectPtr)
Whether the object is in the primary image heap, as opposed to an auxiliary image heap.
|
abstract void |
optionValueChanged(RuntimeOptionKey<?> key)
Notify the GC that the value of a GC-relevant option changed.
|
abstract void |
prepareForSafepoint()
Prepare the heap for a safepoint.
|
abstract boolean |
printLocationInfo(Log log,
org.graalvm.word.UnsignedWord value,
boolean allowJavaHeapAccess,
boolean allowUnsafeOperations)
If the passed value is within the Java heap, this method prints some information about that
value and returns true.
|
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 List<Class<?>> getLoadedClasses()
PredefinedClassesSupport).protected abstract List<Class<?>> getAllClasses()
PredefinedClassesSupport.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 int getImageHeapNullRegionSize()
ImageHeapProvider for more details).public abstract boolean isInImageHeap(Object object)
public abstract boolean isInImageHeap(org.graalvm.word.Pointer objectPtr)
public abstract boolean isInPrimaryImageHeap(Object object)
public abstract boolean isInPrimaryImageHeap(org.graalvm.word.Pointer objectPtr)
public abstract boolean hasReferencePendingList()
public abstract void waitForReferencePendingList()
throws InterruptedException
InterruptedExceptionpublic abstract void wakeUpReferencePendingListWaiters()
Heap.waitForReferencePendingList().public abstract Reference<?> getAndClearReferencePendingList()
null.public abstract boolean printLocationInfo(Log log, org.graalvm.word.UnsignedWord value, boolean allowJavaHeapAccess, boolean allowUnsafeOperations)
public abstract void optionValueChanged(RuntimeOptionKey<?> key)