summaryrefslogtreecommitdiff
path: root/Kernel/VM/PhysicalRegion.cpp
diff options
context:
space:
mode:
authorBen Wiederhake <BenWiederhake.GitHub@gmx.de>2020-09-18 09:49:51 +0200
committerAndreas Kling <kling@serenityos.org>2020-09-25 21:18:17 +0200
commit64cc3f51d0a1d4ddc68fe9e3b5da2834eac48dae (patch)
tree8088b0dfe9a558a28137b2168414371a4fe891b6 /Kernel/VM/PhysicalRegion.cpp
parentfa62c5595e98a8d93d7a6e54b4eab45d9095a2c9 (diff)
downloadserenity-64cc3f51d0a1d4ddc68fe9e3b5da2834eac48dae.zip
Meta+Kernel: Make clang-format-10 clean
Diffstat (limited to 'Kernel/VM/PhysicalRegion.cpp')
-rw-r--r--Kernel/VM/PhysicalRegion.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/Kernel/VM/PhysicalRegion.cpp b/Kernel/VM/PhysicalRegion.cpp
index 84f1e765b0..df28105d65 100644
--- a/Kernel/VM/PhysicalRegion.cpp
+++ b/Kernel/VM/PhysicalRegion.cpp
@@ -95,19 +95,19 @@ Optional<unsigned> PhysicalRegion::find_one_free_page()
// We know we don't have any free pages, no need to check the bitmap
// Check if we can draw one from the return queue
if (m_recently_returned.size() > 0) {
- u8 index = get_fast_random<u8>() % m_recently_returned.size();
- ptrdiff_t local_offset = m_recently_returned[index].get() - m_lower.get();
- m_recently_returned.remove(index);
- ASSERT(local_offset >= 0);
- ASSERT((FlatPtr)local_offset < (FlatPtr)(m_pages * PAGE_SIZE));
- return local_offset / PAGE_SIZE;
+ u8 index = get_fast_random<u8>() % m_recently_returned.size();
+ ptrdiff_t local_offset = m_recently_returned[index].get() - m_lower.get();
+ m_recently_returned.remove(index);
+ ASSERT(local_offset >= 0);
+ ASSERT((FlatPtr)local_offset < (FlatPtr)(m_pages * PAGE_SIZE));
+ return local_offset / PAGE_SIZE;
}
return {};
}
auto free_index = m_bitmap.find_one_anywhere_unset(m_free_hint);
if (!free_index.has_value())
return {};
-
+
auto page_index = free_index.value();
m_bitmap.set(page_index, true);
m_used++;