mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:47:44 +00:00
Kernel: Put all Regions on InlineLinkedLists (separated by user/kernel)
Remove the global hash tables and replace them with InlineLinkedLists. This significantly reduces the kernel heap pressure from doing many small mmap()'s.
This commit is contained in:
parent
a96d76fd90
commit
07425580a8
4 changed files with 14 additions and 8 deletions
|
@ -2,13 +2,15 @@
|
|||
|
||||
#include <AK/AKString.h>
|
||||
#include <AK/Bitmap.h>
|
||||
#include <AK/InlineLinkedList.h>
|
||||
#include <Kernel/VM/PageDirectory.h>
|
||||
#include <Kernel/VM/RangeAllocator.h>
|
||||
|
||||
class Inode;
|
||||
class VMObject;
|
||||
|
||||
class Region : public RefCounted<Region> {
|
||||
class Region : public RefCounted<Region>
|
||||
, public InlineLinkedListNode<Region> {
|
||||
friend class MemoryManager;
|
||||
|
||||
public:
|
||||
|
@ -100,6 +102,10 @@ public:
|
|||
m_access &= ~Access::Write;
|
||||
}
|
||||
|
||||
// For InlineLinkedListNode
|
||||
Region* m_next { nullptr };
|
||||
Region* m_prev { nullptr };
|
||||
|
||||
private:
|
||||
Region(const Range&, const String&, u8 access, bool cow = false);
|
||||
Region(const Range&, NonnullRefPtr<VMObject>, size_t offset_in_vmo, const String&, u8 access, bool cow = false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue