aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/include
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86_64/include')
-rw-r--r--arch/x86_64/include/x86_64/memory/page_table.hpp3
-rw-r--r--arch/x86_64/include/x86_64/memory/scoped_mapping.hpp4
2 files changed, 5 insertions, 2 deletions
diff --git a/arch/x86_64/include/x86_64/memory/page_table.hpp b/arch/x86_64/include/x86_64/memory/page_table.hpp
index 53af5d0..6b8eb8c 100644
--- a/arch/x86_64/include/x86_64/memory/page_table.hpp
+++ b/arch/x86_64/include/x86_64/memory/page_table.hpp
@@ -74,6 +74,9 @@ namespace teachos::memory::x86_64
//! Clear the entire page table, effectively evicting all entries.
auto clear() -> void;
+ //! Check if the page table is empty.
+ [[nodiscard]] auto empty() const noexcept -> bool;
+
private:
std::array<entry, entry_count> m_entries{};
};
diff --git a/arch/x86_64/include/x86_64/memory/scoped_mapping.hpp b/arch/x86_64/include/x86_64/memory/scoped_mapping.hpp
index 1719e6b..5737bb0 100644
--- a/arch/x86_64/include/x86_64/memory/scoped_mapping.hpp
+++ b/arch/x86_64/include/x86_64/memory/scoped_mapping.hpp
@@ -12,7 +12,7 @@ namespace teachos::memory::x86_64
{
scoped_mapping(scoped_mapping const &) = delete;
scoped_mapping(scoped_mapping &&);
- scoped_mapping(linear_address address, frame_allocator & allocator);
+ scoped_mapping(page page, frame_allocator & allocator);
~scoped_mapping();
@@ -29,7 +29,7 @@ namespace teachos::memory::x86_64
}
private:
- linear_address m_address;
+ page m_page;
frame_allocator * m_allocator;
bool m_mapped;
};