diff options
Diffstat (limited to 'arch/x86_64/src/memory')
| -rw-r--r-- | arch/x86_64/src/memory/paging/page_table.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86_64/src/memory/paging/page_table.cpp b/arch/x86_64/src/memory/paging/page_table.cpp index c9b4a37..93cc0de 100644 --- a/arch/x86_64/src/memory/paging/page_table.cpp +++ b/arch/x86_64/src/memory/paging/page_table.cpp @@ -118,7 +118,7 @@ namespace teachos::arch::memory::paging std::construct_at(reinterpret_cast<page_table *>(&_end_of_image + offset)); for (size_t m = 1; m <= PAGE_TABLE_ENTRY_COUNT; ++m) { - size_t offset = sizeof(page_table) * (n + m); + size_t offset = sizeof(page_table) * ((PAGE_TABLE_ENTRY_COUNT * n) + m); std::construct_at(reinterpret_cast<page_table *>(&_end_of_image + offset)); } } |
