mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 07:38:10 +00:00
Kernel: Store VMObject physical pages in a FixedArray
Let's enforce the invariant that VMObjects don't shrink or grow by storing the pages in a FixedArray.
This commit is contained in:
parent
373b8d7cfa
commit
59049ae4b7
3 changed files with 6 additions and 11 deletions
|
@ -6,6 +6,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/FixedArray.h>
|
||||
#include <AK/HashTable.h>
|
||||
#include <AK/IntrusiveList.h>
|
||||
#include <AK/RefCounted.h>
|
||||
|
@ -61,7 +62,6 @@ public:
|
|||
}
|
||||
|
||||
protected:
|
||||
VMObject();
|
||||
explicit VMObject(size_t);
|
||||
explicit VMObject(const VMObject&);
|
||||
|
||||
|
@ -69,7 +69,7 @@ protected:
|
|||
void for_each_region(Callback);
|
||||
|
||||
IntrusiveListNode<VMObject> m_list_node;
|
||||
Vector<RefPtr<PhysicalPage>, 16> m_physical_pages;
|
||||
FixedArray<RefPtr<PhysicalPage>> m_physical_pages;
|
||||
Lock m_paging_lock { "VMObject" };
|
||||
|
||||
mutable SpinLock<u8> m_lock;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue