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<RefPtr<PhysicalPage>> instead.
This commit is contained in:
Andreas Kling 2021-07-11 17:19:07 +02:00
parent 88c8451973
commit 7d096a1287
Notes: sideshowbarker 2024-07-18 09:19:32 +09:00

View File

@ -40,8 +40,8 @@ public:
virtual bool is_contiguous() const { return false; }
size_t page_count() const { return m_physical_pages.size(); }
const Vector<RefPtr<PhysicalPage>, 16>& physical_pages() const { return m_physical_pages; }
Vector<RefPtr<PhysicalPage>, 16>& physical_pages() { return m_physical_pages; }
Span<RefPtr<PhysicalPage> const> physical_pages() const { return m_physical_pages.span(); }
Span<RefPtr<PhysicalPage>> physical_pages() { return m_physical_pages.span(); }
size_t size() const { return m_physical_pages.size() * PAGE_SIZE; }