![]() |
Max OS 0.3
|
Defines a VirtualMemoryManager class for managing virtual memory allocation and mapping to physical memory. More...
Go to the source code of this file.
Classes | |
| struct | MaxOS::memory::VirtualMemoryChunk |
| A container for a region of virtual memory that has been allocated by the Virtual Memory Manager. More... | |
| struct | MaxOS::memory::FreeChunk |
| A chunk of memory that has been freed and is available for allocation. A node in a linked list. More... | |
| struct | MaxOS::memory::VirtualMemoryRegion |
| A region of virtual memory containing multiple chunks (should fit in one page). More... | |
| class | MaxOS::memory::VirtualMemoryManager |
| Manages the virtual memory of the system and provides functions to allocate and free memory in the virtual address space. More... | |
Typedefs | |
| typedef enum MaxOS::memory::VirtualFlags | MaxOS::memory::virtual_flags_t |
| Alias for VirtualFlags enum. | |
| typedef struct MaxOS::memory::VirtualMemoryChunk | MaxOS::memory::virtual_memory_chunk_t |
| Alias for VirtualMemoryChunk struct. | |
| typedef struct MaxOS::memory::FreeChunk | MaxOS::memory::free_chunk_t |
| Alias for FreeChunk struct. | |
| typedef struct PACKED MaxOS::memory::VirtualMemoryRegion | MaxOS::memory::virtual_memory_region_t |
| Alias for VirtualMemoryRegion struct. | |
Enumerations | |
| enum | MaxOS::memory::VirtualFlags { MaxOS::memory::RESERVE = (1 << 9) , MaxOS::memory::SHARED = (1 << 10) } |
| Flags for chunks used in virtual memory allocation. More... | |
Variables | |
| constexpr size_t | MaxOS::memory::CHUNKS_PER_PAGE = PAGE_SIZE / sizeof(virtual_memory_chunk_t) - 1 |
| Number of chunks per virtual memory region (limited to fit in one page) | |
| constexpr size_t | MaxOS::memory::VMM_RESERVED = 0x138000000 |
| The starting address for the VMM to start allocating from when in higher half (otherwise can cause conflicts with kernel space) | |
Defines a VirtualMemoryManager class for managing virtual memory allocation and mapping to physical memory.
Definition in file virtual.h.
Alias for FreeChunk struct.
Alias for VirtualFlags enum.
Alias for VirtualMemoryChunk struct.
Alias for VirtualMemoryRegion struct.
Flags for chunks used in virtual memory allocation.
| Enumerator | |
|---|---|
| RESERVE | Reserve the memory but do not map any physical memory to it. |
| SHARED | The memory is shared between multiple processes. |
Definition at line 38 of file virtual.h.
|
constexpr |
Number of chunks per virtual memory region (limited to fit in one page)
Definition at line 79 of file virtual.h.
Referenced by MaxOS::memory::VirtualMemoryManager::allocate(), MaxOS::memory::VirtualMemoryManager::free(), MaxOS::memory::VirtualMemoryManager::memory_used(), and MaxOS::memory::VirtualMemoryManager::~VirtualMemoryManager().
|
constexpr |
The starting address for the VMM to start allocating from when in higher half (otherwise can cause conflicts with kernel space)
Definition at line 80 of file virtual.h.
Referenced by MaxOS::memory::VirtualMemoryManager::VirtualMemoryManager().