Class BufferedMemory

All Implemented Interfaces:
IAddressSpace, IMemory, IProcess

public class BufferedMemory extends AbstractMemory implements IProcess, IAddressSpace
Object representing a single live process model where a section of memory in a the process can be represented in a byte buffer as its source
See Also:
  • invalid reference
    Can be used for inspection of the
    scc, without the need of a core file
    For example in the following, it is
    used to inspect romMethods:
    
    
    BufferedMemory memory = new BufferedMemory(ByteOrder.nativeOrder());
    IVMData aVMData = VMDataFactory.getVMData((IProcess)memory);
    //this address denotes the beginning of range of interest, not shown here
    memory.addMemorySource(new BufferedMemorySource(sourceStartAddress, size));
    aVMData.bootstrap("com.ibm.j9ddr.vm29.SomeDebugHandler");
    
    public class SomeDebugHandler {
     //can fetch this address from a ROMClass Cookie
     J9ROMClassPointer pointer = J9ROMClassPointer.cast(romStartAddress);
     J9ROMMethodPointer romMethod = pointer.romMethods();
     long dumpFlags = (ByteOrder.nativeOrder() == ByteOrder.BIG_ENDIAN) ? 1 : 0;
     J9BCUtil.j9bcutil_dumpRomMethod(System.out, romMethod, pointer, dumpFlags, J9BCUtil.BCUtil_DumpAnnotations);
    }
    
    
    Behaviour of the model is not defined
    for the case where the underlying source's
    ByteBuffer is modified (address or capacity)
    during use.