nn::os::StackMemory::TryInitialize Member FunctionResult TryInitialize( void * pMem, size_t size );
| Name | Description | |
|---|---|---|
| in | pMem | Pointer to the beginning of the memory region to partition. Must be 4096-byte aligned. |
| in | size | Size of memory region to partition. The size argument must be a multiple of 4096. |
Tries to partition a memory region.
Remaps the memory region specified in the arguments to a different address allocated with 4 KB of unmapped memory before and after. Once that is done, the specified address range cannot be accessed until Finalize is called. Call MemoryBlockBase::GetAddress to get a new map address.
The function returns an error and fails if the region is already initialized, if the alignment restrictions of the arguments are not met, or if address mapping fails internally.
CONFIDENTIAL