mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 09:47:35 +00:00
Make PageDirectory store physical pages in a HashMap.
This container is really just there to keep a retain on the individual PhysicalPages for each page table. A HashMap does the job with far greater space efficiency.
This commit is contained in:
parent
193ead94f8
commit
edac1d6748
3 changed files with 23 additions and 16 deletions
13
AK/HashMap.h
13
AK/HashMap.h
|
@ -70,6 +70,19 @@ public:
|
|||
|
||||
void dump() const { m_table.dump(); }
|
||||
|
||||
V get(const K& key) const
|
||||
{
|
||||
auto it = find(key);
|
||||
if (it == end())
|
||||
return V();
|
||||
return (*it).value;
|
||||
}
|
||||
|
||||
bool contains(const K& key) const
|
||||
{
|
||||
return find(key) != end();
|
||||
}
|
||||
|
||||
private:
|
||||
HashTable<Entry, EntryTraits> m_table;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue