1
Fork 0
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:
Andreas Kling 2018-12-31 15:10:12 +01:00
parent 193ead94f8
commit edac1d6748
3 changed files with 23 additions and 16 deletions

View file

@ -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;
};