mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:38:11 +00:00
Kernel: Move allocate_unbacked_region_anywhere() to MemoryManager
This didn't need to be in RegionTree, and since it's specific to kernel VM anyway, let's move it to MemoryManager.
This commit is contained in:
parent
e0da8da657
commit
f8d798b667
5 changed files with 9 additions and 10 deletions
|
@ -129,13 +129,6 @@ ErrorOr<VirtualRange> RegionTree::allocate_range_randomized(size_t size, size_t
|
|||
return allocate_range_anywhere(size, alignment);
|
||||
}
|
||||
|
||||
ErrorOr<NonnullOwnPtr<Region>> RegionTree::allocate_unbacked_anywhere(size_t size, size_t alignment)
|
||||
{
|
||||
auto region = TRY(Region::create_unbacked());
|
||||
TRY(place_anywhere(*region, RandomizeVirtualAddress::No, size, alignment));
|
||||
return region;
|
||||
}
|
||||
|
||||
ErrorOr<void> RegionTree::place_anywhere(Region& region, RandomizeVirtualAddress randomize_virtual_address, size_t size, size_t alignment)
|
||||
{
|
||||
SpinlockLocker locker(m_lock);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue