mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:17:36 +00:00
Kernel: Add some inline capacity to find_regions_intersecting
This should avoid some allocations during simple cases of munmap, mprotect and msync, where you usually don't have a lot of regions anyway
This commit is contained in:
parent
c3e57bfccb
commit
66fc06001d
2 changed files with 3 additions and 3 deletions
|
@ -253,9 +253,9 @@ Region* AddressSpace::find_region_containing(VirtualRange const& range)
|
|||
return m_region_tree.find_region_containing(range);
|
||||
}
|
||||
|
||||
ErrorOr<Vector<Region*>> AddressSpace::find_regions_intersecting(VirtualRange const& range)
|
||||
ErrorOr<Vector<Region*, 4>> AddressSpace::find_regions_intersecting(VirtualRange const& range)
|
||||
{
|
||||
Vector<Region*> regions = {};
|
||||
Vector<Region*, 4> regions = {};
|
||||
size_t total_size_collected = 0;
|
||||
|
||||
SpinlockLocker lock(m_lock);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue