mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-19 22:25:36 +00:00
Kernel: Use Vector::unstable_remove() when deallocating a region
Process::m_regions is not sorted, so we can use unstable_remove() to avoid shifting the vector contents. :^)
This commit is contained in:
@@ -257,7 +257,7 @@ bool Process::deallocate_region(Region& region)
|
||||
m_region_lookup_cache.region = nullptr;
|
||||
for (int i = 0; i < m_regions.size(); ++i) {
|
||||
if (&m_regions[i] == ®ion) {
|
||||
m_regions.remove(i);
|
||||
m_regions.unstable_remove(i);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user