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
commit 67dbb56444
Notes: sideshowbarker 2024-07-19 03:04:57 +09:00
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;