1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 16:15:10 +00:00

Kernel: Stop allocating page tables from the super pages pool

We now use the regular "user" physical pages for on-demand page table
allocations. This was by far the biggest source of super physical page
exhaustion, so that bug should be a thing of the past now. :^)

We still have super pages, but they are barely used. They remain useful
for code that requires memory with a low physical address.

Fixes #1000.
This commit is contained in:
Andreas Kling 2020-01-17 22:18:56 +01:00
parent f71fc88393
commit ad1f79fb4a
3 changed files with 19 additions and 34 deletions

View file

@ -77,7 +77,7 @@ public:
Yes
};
RefPtr<PhysicalPage> allocate_user_physical_page(ShouldZeroFill);
RefPtr<PhysicalPage> allocate_user_physical_page(ShouldZeroFill = ShouldZeroFill::Yes);
RefPtr<PhysicalPage> allocate_supervisor_physical_page();
void deallocate_user_physical_page(PhysicalPage&&);
void deallocate_supervisor_physical_page(PhysicalPage&&);
@ -151,8 +151,6 @@ private:
RefPtr<PageDirectory> m_kernel_page_directory;
RefPtr<PhysicalPage> m_low_page_table;
VirtualAddress m_quickmap_addr;
unsigned m_user_physical_pages { 0 };
unsigned m_user_physical_pages_used { 0 };
unsigned m_super_physical_pages { 0 };