mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-12 20:42:21 +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
Notes:
sideshowbarker
2024-07-18 09:12:41 +09:00
Author: https://github.com/tomuta
Commit: 9318d9f284
Pull-request: https://github.com/SerenityOS/serenity/pull/8671
Issue: https://github.com/SerenityOS/serenity/issues/8670
Reviewed-by: https://github.com/gunnarbeutner ✅
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
Add a link
Reference in a new issue