Package ghidra.pcode.memstate

# Class MemoryPageBank

java.lang.Object
ghidra.pcode.memstate.MemoryBank
ghidra.pcode.memstate.MemoryPageBank

Direct Known Subclasses:
  `FilteredRegisterBank`, `MemoryPageOverlay`

public class MemoryPageBank extends MemoryBank

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected MapSTL<Long,MemoryPage>`
  `page`

  ### Fields inherited from class ghidra.pcode.memstate.MemoryBank

  `faultHandler`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MemoryPageBank(AddressSpace spc, boolean isBigEndian, int ps, MemoryFaultHandler faultHandler)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected MemoryPage`
  `getPage(long addr)`
  `protected void`
  `setPage(long addr, byte[] val, int skip, int size, int bufOffset)`
  This routine writes data only to a single page of the memory bank.
  `protected void`
  `setPageInitialized(long addr, boolean initialized, int skip, int size, int bufOffset)`
  This routine marks a range within a single page of the memory bank as initialized or uninitialized.

  ### Methods inherited from class ghidra.pcode.memstate.MemoryBank

  `constructValue, deconstructValue, getChunk, getInitializedMaskSize, getMemoryFaultHandler, getPageSize, getSpace, isBigEndian, setChunk, setInitialized`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### page

    protected MapSTL<Long,MemoryPage> page

- ## Constructor Details

  - ### MemoryPageBank

    public MemoryPageBank(AddressSpace spc, boolean isBigEndian, int ps, MemoryFaultHandler faultHandler)

- ## Method Details

  - ### getPage

    protected MemoryPage getPage(long addr)
    Specified by:
      `getPage` in class `MemoryBank`

  - ### setPage

    protected void setPage(long addr, byte[] val, int skip, int size, int bufOffset)
    Description copied from class: `MemoryBank`
    This routine writes data only to a single page of the memory bank. Bytes need not be written to the exact start of the page, but all bytes must be written to only one page when using this routine. A page is a fixed number of bytes, and the address of a page is always aligned based on this size. This routine may be overridden for a page based implementation of the MemoryBank. The default implementation writes the page as a sequence of aligned words, using the insert method.
    Specified by:
      `setPage` in class `MemoryBank`
    Parameters:
      `addr` - is the aligned offset of the desired page
      `val` - is a pointer to the bytes to be written into the page
      `skip` - is the offset into the page where bytes will be written
      `size` - is the number of bytes to be written
      `bufOffset` - the offset in val from which to get the bytes

  - ### setPageInitialized

    protected void setPageInitialized(long addr, boolean initialized, int skip, int size, int bufOffset)
    Description copied from class: `MemoryBank`
    This routine marks a range within a single page of the memory bank as initialized or uninitialized. A page is a fixed number of bytes, and the address of a page is always aligned based on this size. This routine may be overridden for a page based implementation of the MemoryBank. The default implementation writes the page as a sequence of aligned words, using the insert method.
    Specified by:
      `setPageInitialized` in class `MemoryBank`
    Parameters:
      `addr` - is the aligned offset of the desired page
      `initialized` - true if range should be marked as initialized, false if uninitialized
      `skip` - is the offset into the page where bytes will be written
      `size` - is the number of bytes to be written
      `bufOffset` - the offset in val from which to get the bytes