summaryrefslogtreecommitdiff
path: root/Kernel/VM
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-04-14 02:36:06 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-04-14 02:36:06 +0200
commit3f6408919ff020a9fcf575a231cbbd8820c40a60 (patch)
tree570eda8fc11a4b99fc6fa7fc7abce10af417baf3 /Kernel/VM
parentd5dec1922bd977e92cc86e6e7c0d103ee8a3862d (diff)
downloadserenity-3f6408919ff020a9fcf575a231cbbd8820c40a60.zip
AK: Improve smart pointer ergonomics a bit.
Diffstat (limited to 'Kernel/VM')
-rw-r--r--Kernel/VM/MemoryManager.cpp4
-rw-r--r--Kernel/VM/Region.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/Kernel/VM/MemoryManager.cpp b/Kernel/VM/MemoryManager.cpp
index 06e9ef65ef..3956111d4a 100644
--- a/Kernel/VM/MemoryManager.cpp
+++ b/Kernel/VM/MemoryManager.cpp
@@ -142,7 +142,7 @@ auto MemoryManager::ensure_pte(PageDirectory& page_directory, LinearAddress ladd
dbgprintf("MM: PDE %u not present (requested for L%x), allocating\n", page_directory_index, laddr.get());
#endif
if (page_directory_index == 0) {
- ASSERT(&page_directory == m_kernel_page_directory.ptr());
+ ASSERT(&page_directory == m_kernel_page_directory);
pde.set_page_table_base((dword)m_page_table_zero);
pde.set_user_allowed(false);
pde.set_present(true);
@@ -153,7 +153,7 @@ auto MemoryManager::ensure_pte(PageDirectory& page_directory, LinearAddress ladd
#ifdef MM_DEBUG
dbgprintf("MM: PD K%x (%s) at P%x allocated page table #%u (for L%x) at P%x\n",
&page_directory,
- &page_directory == m_kernel_page_directory.ptr() ? "Kernel" : "User",
+ &page_directory == m_kernel_page_directory ? "Kernel" : "User",
page_directory.cr3(),
page_directory_index,
laddr.get(),
diff --git a/Kernel/VM/Region.h b/Kernel/VM/Region.h
index 1ddc9b50ef..0f015126ac 100644
--- a/Kernel/VM/Region.h
+++ b/Kernel/VM/Region.h
@@ -68,7 +68,7 @@ public:
void set_page_directory(PageDirectory& page_directory)
{
- ASSERT(!m_page_directory || m_page_directory.ptr() == &page_directory);
+ ASSERT(!m_page_directory || m_page_directory == &page_directory);
m_page_directory = page_directory;
}