summaryrefslogtreecommitdiff
path: root/Kernel/VM/AnonymousVMObject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel/VM/AnonymousVMObject.cpp')
-rw-r--r--Kernel/VM/AnonymousVMObject.cpp16
1 files changed, 2 insertions, 14 deletions
diff --git a/Kernel/VM/AnonymousVMObject.cpp b/Kernel/VM/AnonymousVMObject.cpp
index e91ae6ffa9..d41a1ae146 100644
--- a/Kernel/VM/AnonymousVMObject.cpp
+++ b/Kernel/VM/AnonymousVMObject.cpp
@@ -65,16 +65,11 @@ RefPtr<AnonymousVMObject> AnonymousVMObject::try_create_with_size(size_t size, A
return adopt_ref_if_nonnull(new (nothrow) AnonymousVMObject(size, commit));
}
-RefPtr<AnonymousVMObject> AnonymousVMObject::try_create_with_physical_pages(NonnullRefPtrVector<PhysicalPage> physical_pages)
+RefPtr<AnonymousVMObject> AnonymousVMObject::try_create_with_physical_pages(Span<NonnullRefPtr<PhysicalPage>> physical_pages)
{
return adopt_ref_if_nonnull(new (nothrow) AnonymousVMObject(physical_pages));
}
-RefPtr<AnonymousVMObject> AnonymousVMObject::try_create_with_physical_page(PhysicalPage& page)
-{
- return adopt_ref_if_nonnull(new (nothrow) AnonymousVMObject(page));
-}
-
RefPtr<AnonymousVMObject> AnonymousVMObject::try_create_for_physical_range(PhysicalAddress paddr, size_t size)
{
if (paddr.offset(size) < paddr) {
@@ -109,14 +104,7 @@ AnonymousVMObject::AnonymousVMObject(PhysicalAddress paddr, size_t size)
physical_pages()[i] = PhysicalPage::create(paddr.offset(i * PAGE_SIZE), MayReturnToFreeList::No);
}
-AnonymousVMObject::AnonymousVMObject(PhysicalPage& page)
- : VMObject(PAGE_SIZE)
- , m_volatile_ranges_cache({ 0, page_count() })
-{
- physical_pages()[0] = page;
-}
-
-AnonymousVMObject::AnonymousVMObject(NonnullRefPtrVector<PhysicalPage> physical_pages)
+AnonymousVMObject::AnonymousVMObject(Span<NonnullRefPtr<PhysicalPage>> physical_pages)
: VMObject(physical_pages.size() * PAGE_SIZE)
, m_volatile_ranges_cache({ 0, page_count() })
{