From cf833d0e8676f6a5ee6b536b4cb5202e9446ab87 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Mon, 1 Dec 2025 15:55:52 +0100 Subject: x86_64/memory: prevent copying of page root --- arch/x86_64/include/x86_64/memory/paging_root.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/x86_64/include/x86_64/memory/paging_root.hpp b/arch/x86_64/include/x86_64/memory/paging_root.hpp index 365e180..e9b8eef 100644 --- a/arch/x86_64/include/x86_64/memory/paging_root.hpp +++ b/arch/x86_64/include/x86_64/memory/paging_root.hpp @@ -15,6 +15,11 @@ namespace teachos::memory::x86_64 { auto static get() -> paging_root &; + paging_root(paging_root const &) = delete; + paging_root(paging_root &&) = delete; + auto operator=(paging_root const &) -> paging_root & = delete; + auto operator=(paging_root &&) -> paging_root & = delete; + [[nodiscard]] auto translate(linear_address address) const -> std::optional; [[nodiscard]] auto translate(page page) const -> std::optional; -- cgit v1.2.3