public class HeapImpl extends Heap
Constructor and Description |
---|
HeapImpl(org.graalvm.nativeimage.hosted.Feature.FeatureAccess access)
Constructor for subclasses.
|
Modifier and Type | Method and Description |
---|---|
boolean |
assertHub(DynamicHub hub)
For assertions: Verify that the hub is a reference to where DynamicHubs live in the heap.
|
boolean |
assertHubOfObject(Object obj)
For assertions: Verify the hub of the object.
|
void |
disableAllocation(org.graalvm.nativeimage.IsolateThread vmThread) |
void |
endSafepoint()
Reset the heap to the normal execution state.
|
org.graalvm.word.UnsignedWord |
freeMemory() |
List<Class<?>> |
getClassList()
Return a list of all the classes in the heap.
|
HeapChunk.Header<?> |
getEnclosingHeapChunk(Object obj) |
GC |
getGC() |
GCImpl |
getGCImpl() |
org.graalvm.compiler.nodes.spi.GCProvider |
getGCProvider()
Returns a suitable
GCProvider for the garbage collector that is used for this heap. |
static HeapImpl |
getHeapImpl() |
HeapPolicy |
getHeapPolicy() |
HeapVerifierImpl |
getHeapVerifierImpl() |
MemoryMXBean |
getMemoryMXBean()
An accessor for the MemoryMXBean.
|
ObjectHeader |
getObjectHeader()
Get the ObjectHeader implementation that this Heap uses.
|
ObjectHeaderImpl |
getObjectHeaderImpl() |
OldGeneration |
getOldGeneration() |
UninterruptibleUtils.AtomicReference<PinnedObjectImpl> |
getPinHead() |
org.graalvm.word.UnsignedWord |
getUsedObjectBytes()
Return the size, in bytes, of the actual used memory, not the committed memory.
|
YoungGeneration |
getYoungGeneration() |
boolean |
isAllocationDisallowed()
Allocation is disallowed if ...
|
boolean |
isImageHeapObject(Object obj) |
boolean |
isInImageHeap(Object object)
Returns true if the given object is located in the image heap.
|
boolean |
isPinned(Object instance) |
boolean |
isValidSpace(Space space)
For assertions: Verify that a Space is a valid Space.
|
boolean |
isYoungGeneration(Space space) |
org.graalvm.word.UnsignedWord |
maxMemory() |
void |
prepareForSafepoint()
Prepare the heap for a safepoint.
|
Object |
promoteObject(Object original) |
protected void |
report(Log log) |
Log |
report(Log log,
boolean traceHeapChunks) |
void |
resumeAllocation() |
void |
suspendAllocation() |
void |
tearDown()
Tear down the heap, return all allocated virtual memory chunks to VirtualMemoryProvider.
|
org.graalvm.word.UnsignedWord |
totalMemory() |
boolean |
walkHeap(MemoryWalker.Visitor visitor)
Walk the regions of the heap with a MemoryWalker.
|
void |
walkObjects(ObjectVisitor visitor)
Walk all the Objects in the Heap, passing each to the visitor.
|
public HeapImpl(org.graalvm.nativeimage.hosted.Feature.FeatureAccess access)
public static HeapImpl getHeapImpl()
public boolean isInImageHeap(Object object)
Heap
isInImageHeap
in class Heap
public void suspendAllocation()
suspendAllocation
in class Heap
public void resumeAllocation()
resumeAllocation
in class Heap
public void disableAllocation(org.graalvm.nativeimage.IsolateThread vmThread)
disableAllocation
in class Heap
public void walkObjects(ObjectVisitor visitor)
Heap
walkObjects
in class Heap
public boolean walkHeap(MemoryWalker.Visitor visitor)
public final void tearDown()
public ObjectHeader getObjectHeader()
Heap
getObjectHeader
in class Heap
public ObjectHeaderImpl getObjectHeaderImpl()
public GCImpl getGCImpl()
public boolean isAllocationDisallowed()
isAllocationDisallowed
in class Heap
public HeapChunk.Header<?> getEnclosingHeapChunk(Object obj)
public HeapPolicy getHeapPolicy()
public boolean isYoungGeneration(Space space)
public YoungGeneration getYoungGeneration()
public OldGeneration getOldGeneration()
public UninterruptibleUtils.AtomicReference<PinnedObjectImpl> getPinHead()
public boolean isPinned(Object instance)
public boolean isImageHeapObject(Object obj)
public org.graalvm.word.UnsignedWord getUsedObjectBytes()
protected void report(Log log)
public MemoryMXBean getMemoryMXBean()
getMemoryMXBean
in class Heap
public List<Class<?>> getClassList()
getClassList
in class Heap
public HeapVerifierImpl getHeapVerifierImpl()
public boolean assertHub(DynamicHub hub)
public boolean assertHubOfObject(Object obj)
public boolean isValidSpace(Space space)
public org.graalvm.word.UnsignedWord freeMemory()
public org.graalvm.word.UnsignedWord totalMemory()
public org.graalvm.word.UnsignedWord maxMemory()
public org.graalvm.compiler.nodes.spi.GCProvider getGCProvider()
Heap
GCProvider
for the garbage collector that is used for this heap.getGCProvider
in class Heap
public void prepareForSafepoint()
Heap
prepareForSafepoint
in class Heap
public void endSafepoint()
Heap
endSafepoint
in class Heap