Explorar el Código

Kernel: Move Region physical page accessors out of line

Andreas Kling hace 2 años
padre
commit
10399a258f
Se han modificado 2 ficheros con 12 adiciones y 12 borrados
  1. 12 0
      Kernel/Memory/Region.cpp
  2. 0 12
      Kernel/Memory/VMObject.h

+ 12 - 0
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<PhysicalPage>& Region::physical_page_slot(size_t index)
+{
+    VERIFY(index < page_count());
+    return vmobject().physical_pages()[first_page_index() + index];
+}
+
 }

+ 0 - 12
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<PhysicalPage>& Region::physical_page_slot(size_t index)
-{
-    VERIFY(index < page_count());
-    return vmobject().physical_pages()[first_page_index() + index];
-}
-
 }