From 7d096a1287caa79b697fbb7da515104353dc3592 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 11 Jul 2021 17:19:07 +0200 Subject: [PATCH] Kernel: Make VMObject vend physical page range as a span Stop exposing the internal data structure used for storing the physical pages and return a Span> instead. --- Kernel/VM/VMObject.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Kernel/VM/VMObject.h b/Kernel/VM/VMObject.h index 3c9cfbb831..58ae7276c3 100644 --- a/Kernel/VM/VMObject.h +++ b/Kernel/VM/VMObject.h @@ -40,8 +40,8 @@ public: virtual bool is_contiguous() const { return false; } size_t page_count() const { return m_physical_pages.size(); } - const Vector, 16>& physical_pages() const { return m_physical_pages; } - Vector, 16>& physical_pages() { return m_physical_pages; } + Span const> physical_pages() const { return m_physical_pages.span(); } + Span> physical_pages() { return m_physical_pages.span(); } size_t size() const { return m_physical_pages.size() * PAGE_SIZE; }