diff options
Diffstat (limited to 'src/core/memory.cpp')
-rw-r--r-- | src/core/memory.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core/memory.cpp b/src/core/memory.cpp index fa49f3dd0f..2098f13f75 100644 --- a/src/core/memory.cpp +++ b/src/core/memory.cpp @@ -24,6 +24,18 @@ namespace Memory { static Common::PageTable* current_page_table = nullptr; +// Implementation class used to keep the specifics of the memory subsystem hidden +// from outside classes. This also allows modification to the internals of the memory +// subsystem without needing to rebuild all files that make use of the memory interface. +struct Memory::Impl { + explicit Impl(Core::System& system_) : system{system_} {} + + Core::System& system; +}; + +Memory::Memory(Core::System& system) : impl{std::make_unique<Impl>(system)} {} +Memory::~Memory() = default; + void SetCurrentPageTable(Kernel::Process& process) { current_page_table = &process.VMManager().page_table; |