mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 06:38:10 +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
|
@ -1242,4 +1242,11 @@ ErrorOr<NonnullOwnPtr<Memory::Region>> MemoryManager::create_identity_mapped_reg
|
|||
return region;
|
||||
}
|
||||
|
||||
ErrorOr<NonnullOwnPtr<Region>> MemoryManager::allocate_unbacked_region_anywhere(size_t size, size_t alignment)
|
||||
{
|
||||
auto region = TRY(Region::create_unbacked());
|
||||
TRY(m_region_tree.place_anywhere(*region, RandomizeVirtualAddress::No, size, alignment));
|
||||
return region;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue