diff options
| author | Matteo Gmür <matteo.gmuer1@ost.ch> | 2024-11-24 13:27:15 +0000 |
|---|---|---|
| committer | Matteo Gmür <matteo.gmuer1@ost.ch> | 2024-11-24 13:27:15 +0000 |
| commit | 47732f54474a083e9f98e52714c12c0ca1181174 (patch) | |
| tree | a350031797e8fd98b22de18e7a720fd0e9f57e11 /arch/x86_64/src/memory/paging | |
| parent | 24805678884bcfcc3f14e88757955ab574d647cb (diff) | |
| download | teachos-47732f54474a083e9f98e52714c12c0ca1181174.tar.xz teachos-47732f54474a083e9f98e52714c12c0ca1181174.zip | |
Use container helper classes for heap remapping
Diffstat (limited to 'arch/x86_64/src/memory/paging')
| -rw-r--r-- | arch/x86_64/src/memory/paging/virtual_page.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/x86_64/src/memory/paging/virtual_page.cpp b/arch/x86_64/src/memory/paging/virtual_page.cpp index f798709..d374156 100644 --- a/arch/x86_64/src/memory/paging/virtual_page.cpp +++ b/arch/x86_64/src/memory/paging/virtual_page.cpp @@ -17,4 +17,17 @@ namespace teachos::arch::memory::paging { return (page_number >> (level * 9U)) & 0x1FF; } + + auto virtual_page::operator++(int) -> virtual_page + { + virtual_page const old_value = *this; + ++page_number; + return old_value; + } + + auto virtual_page::operator++() -> virtual_page & + { + ++page_number; + return *this; + } } // namespace teachos::arch::memory::paging |
