Browse Source

Kernel: Oops, fix bad sort order of available VM ranges

This made the allocator perform worse, so here's another second off of
the Kernel/Process.cpp compile time from a simple bugfix! (31s to 30s)
Andreas Kling 5 years ago
parent
commit
05836757c6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Kernel/VM/RangeAllocator.cpp

+ 1 - 1
Kernel/VM/RangeAllocator.cpp

@@ -170,7 +170,7 @@ void RangeAllocator::deallocate(Range range)
         inserted_index = nearby_index;
     } else {
         m_available_ranges.insert_before_matching(Range(range), [&](auto& entry) {
-            return entry.base() < range.end();
+            return entry.base() >= range.end();
         }, nearby_index, &inserted_index);
     }