use of com.ibm.j9ddr.vm29.pointer.generated.MM_MemorySpacePointer in project openj9 by eclipse.
the class DTFJJavaRuntime method getHeaps.
@SuppressWarnings("rawtypes")
public Iterator getHeaps() throws UnsupportedOperationException {
try {
LinkedList<Object> heaps = new LinkedList<Object>();
VoidPointer memorySpace = DTFJContext.getVm().defaultMemorySpace();
MM_MemorySpacePointer defaultMemorySpace = MM_MemorySpacePointer.cast(memorySpace);
U8Pointer namePtr = defaultMemorySpace._name();
// MEMORY_SPACE_NAME_UNDEFINED
String name = "No name";
if (namePtr != null && namePtr != U8Pointer.NULL) {
try {
name = namePtr.getCStringAtOffset(0);
} catch (com.ibm.j9ddr.CorruptDataException e) {
name = "<<corrupt heap name>>";
}
}
heaps.add(new DTFJJavaHeap(defaultMemorySpace, name, DTFJContext.getImagePointer(memorySpace.getAddress())));
return heaps.iterator();
} catch (Throwable t) {
CorruptData cd = J9DDRDTFJUtils.handleAsCorruptData(DTFJContext.getProcess(), t);
return corruptIterator(cd);
}
}
Aggregations