mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-08 09:35:15 +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:
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user