diff options
author | Ben Wiederhake <BenWiederhake.GitHub@gmx.de> | 2020-09-18 09:49:51 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-09-25 21:18:17 +0200 |
commit | 64cc3f51d0a1d4ddc68fe9e3b5da2834eac48dae (patch) | |
tree | 8088b0dfe9a558a28137b2168414371a4fe891b6 /Kernel/VM/PhysicalRegion.cpp | |
parent | fa62c5595e98a8d93d7a6e54b4eab45d9095a2c9 (diff) | |
download | serenity-64cc3f51d0a1d4ddc68fe9e3b5da2834eac48dae.zip |
Meta+Kernel: Make clang-format-10 clean
Diffstat (limited to 'Kernel/VM/PhysicalRegion.cpp')
-rw-r--r-- | Kernel/VM/PhysicalRegion.cpp | 14 |
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++; |