mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:47:45 +00:00
Revert "Kernel: Make PhysicalPage not movable and use atomic ref counting"
This reverts commit a89ccd842b
.
This commit is contained in:
parent
23f335bcd7
commit
0db7e04c2e
5 changed files with 24 additions and 20 deletions
|
@ -49,12 +49,12 @@ public:
|
|||
unsigned size() const { return m_pages; }
|
||||
unsigned used() const { return m_used; }
|
||||
unsigned free() const { return m_pages - m_used; }
|
||||
bool contains(const PhysicalPage& page) const { return page.paddr() >= m_lower && page.paddr() <= m_upper; }
|
||||
bool contains(PhysicalPage& page) const { return page.paddr() >= m_lower && page.paddr() <= m_upper; }
|
||||
|
||||
RefPtr<PhysicalPage> take_free_page(bool supervisor);
|
||||
NonnullRefPtrVector<PhysicalPage> take_contiguous_free_pages(size_t count, bool supervisor);
|
||||
void return_page_at(PhysicalAddress addr);
|
||||
void return_page(const PhysicalPage& page) { return_page_at(page.paddr()); }
|
||||
void return_page(PhysicalPage&& page) { return_page_at(page.paddr()); }
|
||||
|
||||
private:
|
||||
unsigned find_contiguous_free_pages(size_t count);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue