From 05836757c6f1937c75f5efae37a29f92721d5e1c Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 19 Jan 2020 15:53:43 +0100 Subject: [PATCH] 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) --- Kernel/VM/RangeAllocator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kernel/VM/RangeAllocator.cpp b/Kernel/VM/RangeAllocator.cpp index 7adfe080c4..dd8dbb4db9 100644 --- a/Kernel/VM/RangeAllocator.cpp +++ b/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); }