mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 01:08:11 +00:00
Kernel: Don't skip if found free page to allocate from a super region
This was a bad pattern that wasn't detected because we only had one super physical region that was initialized by MemoryManager.
This commit is contained in:
parent
b37139e111
commit
afba614d68
1 changed files with 4 additions and 4 deletions
|
@ -571,8 +571,8 @@ NonnullRefPtrVector<PhysicalPage> MemoryManager::allocate_contiguous_supervisor_
|
||||||
|
|
||||||
for (auto& region : m_super_physical_regions) {
|
for (auto& region : m_super_physical_regions) {
|
||||||
physical_pages = region.take_contiguous_free_pages((count), true);
|
physical_pages = region.take_contiguous_free_pages((count), true);
|
||||||
if (physical_pages.is_empty())
|
if (!physical_pages.is_empty())
|
||||||
continue;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (physical_pages.is_empty()) {
|
if (physical_pages.is_empty()) {
|
||||||
|
@ -598,8 +598,8 @@ RefPtr<PhysicalPage> MemoryManager::allocate_supervisor_physical_page()
|
||||||
|
|
||||||
for (auto& region : m_super_physical_regions) {
|
for (auto& region : m_super_physical_regions) {
|
||||||
page = region.take_free_page(true);
|
page = region.take_free_page(true);
|
||||||
if (page.is_null())
|
if (!page.is_null())
|
||||||
continue;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!page) {
|
if (!page) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue