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 năm trước cách đây
mục cha
commit
05836757c6
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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);
     }