public class HeapImpl extends Heap
| Constructor and Description |
|---|
HeapImpl(org.graalvm.nativeimage.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.
|
PinnedAllocator |
createPinnedAllocator()
Create a PinnedAllocator.
|
void |
disableAllocation(org.graalvm.nativeimage.IsolateThread vmThread) |
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() |
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 |
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() |
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.Feature.FeatureAccess access)
public static HeapImpl getHeapImpl()
public void suspendAllocation()
suspendAllocation in class Heappublic void resumeAllocation()
resumeAllocation in class Heappublic void disableAllocation(org.graalvm.nativeimage.IsolateThread vmThread)
disableAllocation in class Heappublic PinnedAllocator createPinnedAllocator()
HeapcreatePinnedAllocator in class Heappublic void walkObjects(ObjectVisitor visitor)
HeapwalkObjects in class Heappublic boolean walkHeap(MemoryWalker.Visitor visitor)
public final void tearDown()
public ObjectHeader getObjectHeader()
HeapgetObjectHeader in class Heappublic ObjectHeaderImpl getObjectHeaderImpl()
public GCImpl getGCImpl()
public boolean isAllocationDisallowed()
isAllocationDisallowed in class Heappublic 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 Heappublic List<Class<?>> getClassList()
getClassList in class Heappublic 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()