mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:38:11 +00:00
Kernel: Use Vector::unstable_remove() in a couple of places
This commit is contained in:
parent
575664cda3
commit
e23536d682
3 changed files with 5 additions and 5 deletions
|
@ -185,7 +185,7 @@ bool Process::deallocate_region(Region& region)
|
|||
InterruptDisabler disabler;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
@ -757,7 +757,7 @@ int Process::do_exec(NonnullRefPtr<FileDescription> main_program_description, Ve
|
|||
prot |= PROT_READ;
|
||||
if (is_writable)
|
||||
prot |= PROT_WRITE;
|
||||
if (auto* region = allocate_region(vaddr.offset(totally_random_offset), size, String(name), prot))
|
||||
if (auto* region = allocate_region(vaddr.offset(totally_random_offset), size, String(name), prot))
|
||||
return region->vaddr().as_ptr();
|
||||
return nullptr;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue