mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:18:11 +00:00
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.
This commit is contained in:
parent
f943e97b76
commit
30e6b313b4
1 changed files with 0 additions and 14 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue