summaryrefslogtreecommitdiff
path: root/Kernel/Memory
diff options
context:
space:
mode:
authorIdan Horowitz <idan.horowitz@gmail.com>2022-04-04 01:02:33 +0300
committerAndreas Kling <kling@serenityos.org>2022-04-04 00:16:11 +0200
commit30e6b313b4095473765b443370794ef88e071f27 (patch)
tree1839a311d84de7e54f940ce2899b1f4a066018b5 /Kernel/Memory
parentf943e97b7643ab80fb59f11714f8efbcf7863de7 (diff)
downloadserenity-30e6b313b4095473765b443370794ef88e071f27.zip
Kernel: Remove false condition in RegionTree::allocate_range_specific
Since find_largest_not_above returns the highest region that is below the end of the request range, no region after it can intersect with it.
Diffstat (limited to 'Kernel/Memory')
-rw-r--r--Kernel/Memory/RegionTree.cpp14
1 files changed, 0 insertions, 14 deletions
diff --git a/Kernel/Memory/RegionTree.cpp b/Kernel/Memory/RegionTree.cpp
index 65ce2aa325..ecbac58d2f 100644
--- a/Kernel/Memory/RegionTree.cpp
+++ b/Kernel/Memory/RegionTree.cpp
@@ -101,20 +101,6 @@ ErrorOr<VirtualRange> RegionTree::allocate_range_specific(VirtualAddress base, s
return ENOMEM;
}
- auto it = m_regions.begin_from(region->vaddr().get());
- VERIFY(!it.is_end());
- ++it;
-
- if (it.is_end()) {
- // The range can be accommodated above the nearest range.
- return range;
- }
-
- if (it->range().intersects(range)) {
- // Requested range overlaps the next neighbor.
- return ENOMEM;
- }
-
// Requested range fits between first region and its next neighbor.
return range;
}