summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom <tomut@yahoo.com>2021-07-11 21:22:38 -0600
committerGunnar Beutner <gunnar@beutner.name>2021-07-12 10:45:53 +0200
commit9318d9f284a4597c14c85e281c3c84880509f598 (patch)
tree79e54c89c81c56c03a19218518b5c7b44c9c8584
parent84b4b9447d682efdab1e83b3cb0cd8a239825226 (diff)
downloadserenity-9318d9f284a4597c14c85e281c3c84880509f598.zip
Kernel: Fix allocating VMObject from page array
The VMObject constructor takes the size in bytes. Fixes #8670
-rw-r--r--Kernel/VM/AnonymousVMObject.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/VM/AnonymousVMObject.cpp b/Kernel/VM/AnonymousVMObject.cpp
index c218d77121..6d0f6763f9 100644
--- a/Kernel/VM/AnonymousVMObject.cpp
+++ b/Kernel/VM/AnonymousVMObject.cpp
@@ -117,7 +117,7 @@ AnonymousVMObject::AnonymousVMObject(PhysicalPage& page)
}
AnonymousVMObject::AnonymousVMObject(NonnullRefPtrVector<PhysicalPage> physical_pages)
- : VMObject(physical_pages.size())
+ : VMObject(physical_pages.size() * PAGE_SIZE)
, m_volatile_ranges_cache({ 0, page_count() })
{
for (size_t i = 0; i < physical_pages.size(); ++i) {