kernel/vm: Adjust next-insert hint on area removal.

This doesn't matter so much because the hint's used for
an AVL tree lookup both for next and previous, but it
probably does at least a bit because the new area's size
is used in the tree lookups.
This commit is contained in:
Augustin Cavalier
2025-07-01 00:19:50 -04:00
parent be1a714a52
commit da5a0edd02
@@ -218,6 +218,9 @@ VMUserAddressSpace::RemoveArea(VMArea* _area, uint32 allocationFlags)
IncrementChangeCount();
fFreeSpace += area->Size();
}
if ((area->Base() + area->Size()) == fNextInsertHint)
fNextInsertHint -= area->Size();
}