aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/src/memory
diff options
context:
space:
mode:
authorFabian Imhof <fabian.imhof@ost.ch>2024-10-22 09:19:57 +0000
committerFabian Imhof <fabian.imhof@ost.ch>2024-10-22 09:19:57 +0000
commitd42ef85dbc3786fb45b8b4625b3f07446f51390d (patch)
tree9a0513c9c50cecd7e2fd3d66b09f20aac742f66b /arch/x86_64/src/memory
parent1e93ec64e13bb14b79bf79d6c804570f26d62dda (diff)
downloadteachos-d42ef85dbc3786fb45b8b4625b3f07446f51390d.tar.xz
teachos-d42ef85dbc3786fb45b8b4625b3f07446f51390d.zip
add todos
Diffstat (limited to 'arch/x86_64/src/memory')
-rw-r--r--arch/x86_64/src/memory/paging/page_table.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86_64/src/memory/paging/page_table.cpp b/arch/x86_64/src/memory/paging/page_table.cpp
index 33d0b75..5faad24 100644
--- a/arch/x86_64/src/memory/paging/page_table.cpp
+++ b/arch/x86_64/src/memory/paging/page_table.cpp
@@ -46,8 +46,8 @@ namespace teachos::arch::memory::paging
*/
auto next_table_address(std::size_t table_index) -> std::optional<std::size_t>;
- entry entries[PAGE_TABLE_ENTRY_COUNT]; ///< Entries containing addresses to page tables of a level below or
- ///< actual virtual addresses for the level 1 page table.
+ entry entries[PAGE_TABLE_ENTRY_COUNT] = {}; ///< Entries containing addresses to page tables of a level below or
+ ///< actual virtual addresses for the level 1 page table.
};
auto page_table::zero_entries() -> void
@@ -55,6 +55,7 @@ namespace teachos::arch::memory::paging
constexpr size_t entry_amount = sizeof(entries) / sizeof(entries[0]);
for (size_t i = 0; i < entry_amount; ++i)
{
+ // TODO: Crashes when trying to access entry!
auto entry = this->operator[](i);
entry.set_unused();
}