mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 00:08:11 +00:00
Kernel: Actually fix accidental overlaps in allocate_range_specific()
Thanks to Idan for spotting this! :^)
This commit is contained in:
parent
5506932788
commit
db75bab493
1 changed files with 1 additions and 1 deletions
|
@ -90,7 +90,7 @@ ErrorOr<VirtualRange> RegionTree::allocate_range_specific(VirtualAddress base, s
|
||||||
if (!m_total_range.contains(range))
|
if (!m_total_range.contains(range))
|
||||||
return ENOMEM;
|
return ENOMEM;
|
||||||
|
|
||||||
auto* region = m_regions.find_largest_not_above(base.offset(size).get());
|
auto* region = m_regions.find_largest_not_above(base.offset(size - 1).get());
|
||||||
if (!region) {
|
if (!region) {
|
||||||
// The range can be accommodated below the current lowest range.
|
// The range can be accommodated below the current lowest range.
|
||||||
return range;
|
return range;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue