mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-13 06:34:23 -04:00
kern: KMemoryManager::Allocate -> AllocateAndOpen
This commit is contained in:
parent
3bce008170
commit
cc11d452e5
8 changed files with 85 additions and 44 deletions
|
@ -158,12 +158,9 @@ namespace ams::kern::init {
|
|||
|
||||
/* Allocate memory for the slab. */
|
||||
constexpr auto AllocateOption = KMemoryManager::EncodeOption(KMemoryManager::Pool_System, KMemoryManager::Direction_FromFront);
|
||||
const KVirtualAddress slab_address = Kernel::GetMemoryManager().AllocateContinuous(num_pages, 1, AllocateOption);
|
||||
const KVirtualAddress slab_address = Kernel::GetMemoryManager().AllocateAndOpenContinuous(num_pages, 1, AllocateOption);
|
||||
MESOSPHERE_ABORT_UNLESS(slab_address != Null<KVirtualAddress>);
|
||||
|
||||
/* Open references to the slab. */
|
||||
Kernel::GetMemoryManager().Open(slab_address, num_pages);
|
||||
|
||||
/* Initialize the slabheap. */
|
||||
KPageBuffer::InitializeSlabHeap(GetVoidPointer(slab_address), slab_size);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue