1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:57:44 +00:00

Kernel: Release page tables when no longer needed

When unmapping regions, check if page tables can be freed.

This is a follow-up change for #3254.
This commit is contained in:
Tom 2020-08-27 21:29:17 -06:00 committed by Andreas Kling
parent 88319b188e
commit 67dbb56444
5 changed files with 50 additions and 7 deletions

View file

@ -193,8 +193,9 @@ private:
PageDirectoryEntry* quickmap_pd(PageDirectory&, size_t pdpt_index);
PageTableEntry* quickmap_pt(PhysicalAddress);
const PageTableEntry* pte(const PageDirectory&, VirtualAddress);
PageTableEntry* pte(const PageDirectory&, VirtualAddress);
PageTableEntry& ensure_pte(PageDirectory&, VirtualAddress);
void release_pte(PageDirectory&, VirtualAddress, bool);
RefPtr<PageDirectory> m_kernel_page_directory;
RefPtr<PhysicalPage> m_low_page_table;