mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 05:08:13 +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
|
@ -382,7 +382,7 @@ OwnPtr<Region> MemoryManager::allocate_kernel_region_with_vmobject(VMObject& vmo
|
|||
return allocate_kernel_region_with_vmobject(range, vmobject, name, access, user_accessible, cacheable);
|
||||
}
|
||||
|
||||
void MemoryManager::deallocate_user_physical_page(const PhysicalPage& page)
|
||||
void MemoryManager::deallocate_user_physical_page(PhysicalPage&& page)
|
||||
{
|
||||
ScopedSpinLock lock(s_mm_lock);
|
||||
for (auto& region : m_user_physical_regions) {
|
||||
|
@ -391,7 +391,7 @@ void MemoryManager::deallocate_user_physical_page(const PhysicalPage& page)
|
|||
continue;
|
||||
}
|
||||
|
||||
region.return_page(page);
|
||||
region.return_page(move(page));
|
||||
--m_user_physical_pages_used;
|
||||
|
||||
return;
|
||||
|
@ -452,7 +452,7 @@ RefPtr<PhysicalPage> MemoryManager::allocate_user_physical_page(ShouldZeroFill s
|
|||
return page;
|
||||
}
|
||||
|
||||
void MemoryManager::deallocate_supervisor_physical_page(const PhysicalPage& page)
|
||||
void MemoryManager::deallocate_supervisor_physical_page(PhysicalPage&& page)
|
||||
{
|
||||
ScopedSpinLock lock(s_mm_lock);
|
||||
for (auto& region : m_super_physical_regions) {
|
||||
|
@ -461,7 +461,7 @@ void MemoryManager::deallocate_supervisor_physical_page(const PhysicalPage& page
|
|||
continue;
|
||||
}
|
||||
|
||||
region.return_page(page);
|
||||
region.return_page(move(page));
|
||||
--m_super_physical_pages_used;
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue