Module openj9.dtfj

Class UnbackedMemorySource

All Implemented Interfaces:
IDetailedMemoryRange, IMemoryRange, IMemorySource, Comparable<IMemoryRange>

public class UnbackedMemorySource extends ProtectedMemoryRange implements IMemorySource, IDetailedMemoryRange
Memory source for storage range that is declared, but not backed. Any attempt to read storage results in a MemoryFault
  • Constructor Details

    • UnbackedMemorySource

      public UnbackedMemorySource(long base, long size, String explanation, int asid, String name)
      Parameters:
      base - Base address for this range
      size - Size of this range
      explanation - String message explaining why this section isn't backed with storage
      asid - Address space id
    • UnbackedMemorySource

      public UnbackedMemorySource(long base, long size, String explanation)
      Parameters:
      base - Base address for this range
      size - Size of this range
      explanation - String message explaining why this section isn't backed with storage
  • Method Details

    • getAddressSpaceId

      public int getAddressSpaceId()
      Specified by:
      getAddressSpaceId in interface IMemoryRange
      Returns:
      Address space ID that this range belongs to.
    • getBytes

      public int getBytes(long address, byte[] buffer, int offset, int length) throws MemoryFault
      Description copied from interface: IMemorySource
      Reads data from the memory range
      Specified by:
      getBytes in interface IMemorySource
      Parameters:
      address - Starting address
      buffer - Buffer to read into
      offset - Offset in buffer to write to
      length - Number of bytes to read
      Returns:
      Bytes read
      Throws:
      MemoryFault
    • getName

      public String getName()
      Specified by:
      getName in interface IMemoryRange
      Returns:
      Name of this range (e.g. .text or stack), or null if range is unnamed.
    • isBacked

      public boolean isBacked()
      Specified by:
      isBacked in interface IMemoryRange
      Specified by:
      isBacked in interface IMemorySource
      Returns:
      True if this memory range is backed with data (such that getBytes() won't always throw MemoryFault).
    • getProperties

      public Properties getProperties()
      Specified by:
      getProperties in interface IDetailedMemoryRange
    • isExecutable

      public boolean isExecutable()
      Specified by:
      isExecutable in interface IMemoryRange
    • isReadOnly

      public boolean isReadOnly()
      Specified by:
      isReadOnly in interface IMemoryRange