mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 10:22:05 -05:00
Kernel: Fix allocating VMObject from page array
The VMObject constructor takes the size in bytes. Fixes #8670
This commit is contained in:
parent
84b4b9447d
commit
9318d9f284
1 changed files with 1 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue