Package ghidra.pcode.memstate
Class UniqueMemoryBank
- java.lang.Object
 - 
- ghidra.pcode.memstate.MemoryBank
 - 
- ghidra.pcode.memstate.UniqueMemoryBank
 
 
 
- 
public class UniqueMemoryBank extends MemoryBank
An subclass ofMemoryBankintended for modeling the "unique" memory space. The space is byte-addressable and paging is not supported. 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classUniqueMemoryBank.WordInfoA simple class representing a byte-addressable word of memory. 
- 
Field Summary
Fields Modifier and Type Field Description protected MapSTL<java.lang.Long,UniqueMemoryBank.WordInfo>mapA map fromLongoffsets to byte values would require many lookups.- 
Fields inherited from class ghidra.pcode.memstate.MemoryBank
faultHandler 
 - 
 
- 
Constructor Summary
Constructors Constructor Description UniqueMemoryBank(AddressSpace spc, boolean isBigEndian) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Clear unique storage at the start of an instructionintgetChunk(long offset, int size, byte[] dest, boolean stopOnUninitialized)protected MemoryPagegetPage(long addr)voidsetChunk(long offset, int size, byte[] src)protected voidsetPage(long addr, byte[] val, int skip, int size, int bufOffset)protected voidsetPageInitialized(long addr, boolean initialized, int skip, int size, int bufOffset)- 
Methods inherited from class ghidra.pcode.memstate.MemoryBank
constructValue, deconstructValue, getInitializedMaskSize, getMemoryFaultHandler, getPageSize, getSpace, isBigEndian, setInitialized 
 - 
 
 - 
 
- 
- 
Field Detail
- 
map
protected MapSTL<java.lang.Long,UniqueMemoryBank.WordInfo> map
A map fromLongoffsets to byte values would require many lookups. As an optimization, this map is defined fromLongvalues toUniqueMemoryBank.WordInfoobjects, each of which represents an eight-byte word of memory. Each key in this map must be 0 mod 8. 
 - 
 
- 
Constructor Detail
- 
UniqueMemoryBank
public UniqueMemoryBank(AddressSpace spc, boolean isBigEndian)
 
 - 
 
- 
Method Detail
- 
getPage
protected MemoryPage getPage(long addr)
- Specified by:
 getPagein classMemoryBank
 
- 
setPage
protected void setPage(long addr, byte[] val, int skip, int size, int bufOffset)- Specified by:
 setPagein classMemoryBank
 
- 
setPageInitialized
protected void setPageInitialized(long addr, boolean initialized, int skip, int size, int bufOffset)- Specified by:
 setPageInitializedin classMemoryBank
 
- 
getChunk
public int getChunk(long offset, int size, byte[] dest, boolean stopOnUninitialized)- Overrides:
 getChunkin classMemoryBank
 
- 
setChunk
public void setChunk(long offset, int size, byte[] src)- Overrides:
 setChunkin classMemoryBank
 
- 
clear
public void clear()
Clear unique storage at the start of an instruction 
 - 
 
 -