mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:57:45 +00:00
Kernel: Remove "supervisor" bit from PhysicalPage
Instead of each PhysicalPage knowing whether it comes from the supervisor pages or from the user pages, we can just check in both sets when freeing a page. It's just a handful of pointer range checks, nothing expensive.
This commit is contained in:
parent
ac78f1e812
commit
c2792212f4
9 changed files with 39 additions and 53 deletions
|
@ -31,8 +31,8 @@ public:
|
|||
|
||||
PhysicalRegion take_pages_from_beginning(unsigned);
|
||||
|
||||
RefPtr<PhysicalPage> take_free_page(bool supervisor);
|
||||
NonnullRefPtrVector<PhysicalPage> take_contiguous_free_pages(size_t count, bool supervisor, size_t physical_alignment = PAGE_SIZE);
|
||||
RefPtr<PhysicalPage> take_free_page();
|
||||
NonnullRefPtrVector<PhysicalPage> take_contiguous_free_pages(size_t count, size_t physical_alignment = PAGE_SIZE);
|
||||
void return_page(PhysicalAddress);
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue