Class UninitializedMemorySpace
Represents a chunk of uninitialized (unknown) memory. Writing to this memory space does not change the contents.
public class UninitializedMemorySpace : IMemorySpace
- Inheritance
-
UninitializedMemorySpace
- Implements
- Derived
- Inherited Members
Constructors
UninitializedMemorySpace(int)
Creates a new uninitialized memory space.
public UninitializedMemorySpace(int size)
Parameters
sizeintThe number of bytes to store in the space.
Properties
AddressRange
Gets the range that this memory space spans.
public AddressRange AddressRange { get; }
Property Value
Methods
IsValidAddress(long)
Gets a value indicating whether the provided address is a valid address, and can be used to read and/or write to.
public bool IsValidAddress(long address)
Parameters
addresslongThe address to query.
Returns
- bool
trueif the address was valid,falseotherwise.
Read(long, BitVectorSpan)
Copies data at the provided address into the provided buffer.
public void Read(long address, BitVectorSpan buffer)
Parameters
addresslongThe address to start reading at.
bufferBitVectorSpanThe buffer to write into.
Rebase(long)
Relocates the memory to a new base address.
public void Rebase(long baseAddress)
Parameters
baseAddresslongThe new base address.
Write(long, BitVectorSpan)
Writes the provided buffer of data at the provided address.
public void Write(long address, BitVectorSpan buffer)
Parameters
addresslongThe address to start writing at.
bufferBitVectorSpanThe data to write.
Write(long, ReadOnlySpan<byte>)
Writes the provided buffer of data at the provided address.
public void Write(long address, ReadOnlySpan<byte> buffer)
Parameters
addresslongThe address to start writing at.
bufferReadOnlySpan<byte>The data to write.