Преглед на файлове

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 години
родител
ревизия
05836757c6
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  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;
         inserted_index = nearby_index;
     } else {
     } else {
         m_available_ranges.insert_before_matching(Range(range), [&](auto& entry) {
         m_available_ranges.insert_before_matching(Range(range), [&](auto& entry) {
-            return entry.base() < range.end();
+            return entry.base() >= range.end();
         }, nearby_index, &inserted_index);
         }, nearby_index, &inserted_index);
     }
     }