diff options
author | Andreas Kling <kling@serenityos.org> | 2020-08-22 16:34:11 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-08-22 16:34:11 +0200 |
commit | 0db7e04c2ebcd16a948523be5a7dbb024ab1d7c4 (patch) | |
tree | 4a75c1108e1b607a5731a5100b9c932f56fddb5f /Kernel/VM/PhysicalRegion.h | |
parent | 23f335bcd7d31e827f1a5fbda5e210721dcae813 (diff) | |
download | serenity-0db7e04c2ebcd16a948523be5a7dbb024ab1d7c4.zip |
Revert "Kernel: Make PhysicalPage not movable and use atomic ref counting"
This reverts commit a89ccd842becdfbc951436da5384d8819374e0f4.
Diffstat (limited to 'Kernel/VM/PhysicalRegion.h')
-rw-r--r-- | Kernel/VM/PhysicalRegion.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/VM/PhysicalRegion.h b/Kernel/VM/PhysicalRegion.h index bd43d22fea..0a10d5c9d6 100644 --- a/Kernel/VM/PhysicalRegion.h +++ b/Kernel/VM/PhysicalRegion.h @@ -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); |