mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:37:37 +00: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)
|
AnonymousVMObject::AnonymousVMObject(NonnullRefPtrVector<PhysicalPage> physical_pages)
|
||||||
: VMObject(physical_pages.size())
|
: VMObject(physical_pages.size() * PAGE_SIZE)
|
||||||
, m_volatile_ranges_cache({ 0, page_count() })
|
, m_volatile_ranges_cache({ 0, page_count() })
|
||||||
{
|
{
|
||||||
for (size_t i = 0; i < physical_pages.size(); ++i) {
|
for (size_t i = 0; i < physical_pages.size(); ++i) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue