|
| virtual | ~IVirtualMemory ()=default |
| virtual Result< MemoryAddress > | allocateSlot (ProcessId processId, std::size_t size)=0 |
| | Allocates a virtual memory slot for a process.
|
| virtual Result< void > | freeSlot (ProcessId processId)=0 |
| | Frees a previously allocated slot.
|
| virtual Result< void > | loadSegment (ProcessId processId, const std::vector< Block > &data)=0 |
| | Loads a code/data segment into a process's virtual address space.
|
| virtual Result< std::vector< Block > > | readSegment (ProcessId processId) const =0 |
| | Reads the entire code/data segment from a process's virtual memory.
|
| virtual std::size_t | totalSlots () const noexcept=0 |
| | Returns the number of total slots available.
|
| virtual std::size_t | freeSlots () const noexcept=0 |
| | Returns the number of free (unallocated) slots.
|
| virtual bool | hasSlot (ProcessId processId) const noexcept=0 |
| | Checks whether a process has an allocated slot.
|
| virtual std::size_t | slotSize (ProcessId processId) const noexcept=0 |
| | Returns the slot size (number of blocks) for a process, or 0 if no slot.
|
Abstract interface for virtual memory management.
Provides slot-based allocation of virtual address spaces for processes. Each slot represents a contiguous virtual memory region that can be loaded with a code/data segment (vector of Blocks).
VirtualMemory sits conceptually above the MMU — it manages which processes have virtual address spaces and provides bulk load/store operations, while the MMU handles per-address translation.
Definition at line 25 of file i_virtual_memory.h.