35 [[nodiscard]]
virtual std::size_t
size() const noexcept = 0;
Block — the fundamental unit of simulated memory.
Abstract interface for linear addressable memory.
virtual ~IMemory()=default
virtual std::size_t size() const noexcept=0
Returns the total number of addressable cells.
virtual Result< void > write(MemoryAddress address, const Block &block)=0
Writes a Block to the given address.
virtual Result< Block > read(MemoryAddress address) const =0
Reads a Block from the given address.
virtual void clear()=0
Clears all memory cells to default (Nop) blocks.
A result type that holds either a success value of type T or an ErrorCode.
Error codes and Result<T> type for fallible operations.
std::uint32_t MemoryAddress
Represents a memory address (physical or virtual).
A single memory cell in the simulated architecture.
Common type aliases, sentinel constants, and forward declarations used throughout the Contur 2 kernel...