mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +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
Notes:
sideshowbarker
2024-07-18 09:07:12 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/e323942623b
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);
|
||||
|
||||
Optional<PhysicalAddress> page_base;
|
||||
for (auto& zone : m_zones) {
|
||||
for (auto& zone : m_usable_zones) {
|
||||
page_base = zone.allocate_block(order);
|
||||
if (page_base.has_value()) {
|
||||
if (zone.is_empty()) {
|
||||
|
|
Loading…
Reference in a new issue