From 10399a258f93d5d6ea20ca42619242e7e14c2fbd Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 18 Aug 2022 18:52:04 +0200 Subject: [PATCH] Kernel: Move Region physical page accessors out of line --- Kernel/Memory/Region.cpp | 12 ++++++++++++ Kernel/Memory/VMObject.h | 12 ------------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Kernel/Memory/Region.cpp b/Kernel/Memory/Region.cpp index 03e77f69cc..f3aa874f9d 100644 --- a/Kernel/Memory/Region.cpp +++ b/Kernel/Memory/Region.cpp @@ -531,4 +531,16 @@ PageFaultResponse Region::handle_inode_fault(size_t page_index_in_region) return PageFaultResponse::Continue; } +PhysicalPage const* Region::physical_page(size_t index) const +{ + VERIFY(index < page_count()); + return vmobject().physical_pages()[first_page_index() + index]; +} + +RefPtr& Region::physical_page_slot(size_t index) +{ + VERIFY(index < page_count()); + return vmobject().physical_pages()[first_page_index() + index]; +} + } diff --git a/Kernel/Memory/VMObject.h b/Kernel/Memory/VMObject.h index 7432181ecf..557c107d54 100644 --- a/Kernel/Memory/VMObject.h +++ b/Kernel/Memory/VMObject.h @@ -88,16 +88,4 @@ inline void VMObject::for_each_region(Callback callback) } } -inline PhysicalPage const* Region::physical_page(size_t index) const -{ - VERIFY(index < page_count()); - return vmobject().physical_pages()[first_page_index() + index]; -} - -inline RefPtr& Region::physical_page_slot(size_t index) -{ - VERIFY(index < page_count()); - return vmobject().physical_pages()[first_page_index() + index]; -} - }