mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:27:45 +00:00
Kernel: Only loop through usable zones when allocating >1 physical page
We still have to loop here, since a zone can be "usable" while not being able to satisfy a multi-page allocation request.
This commit is contained in:
parent
379bcd26e4
commit
e323942623
1 changed files with 1 additions and 1 deletions
|
@ -74,7 +74,7 @@ NonnullRefPtrVector<PhysicalPage> PhysicalRegion::take_contiguous_free_pages(siz
|
||||||
auto order = __builtin_ctz(rounded_page_count);
|
auto order = __builtin_ctz(rounded_page_count);
|
||||||
|
|
||||||
Optional<PhysicalAddress> page_base;
|
Optional<PhysicalAddress> page_base;
|
||||||
for (auto& zone : m_zones) {
|
for (auto& zone : m_usable_zones) {
|
||||||
page_base = zone.allocate_block(order);
|
page_base = zone.allocate_block(order);
|
||||||
if (page_base.has_value()) {
|
if (page_base.has_value()) {
|
||||||
if (zone.is_empty()) {
|
if (zone.is_empty()) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue