nn::os::StackMemoryAutoStackManager::Initialize Member Function
void Initialize(
fnd::IAllocator * pAllocator,
uptr stackBottom
);
| Name | Description | |
|---|---|---|
| in | pAllocator | Specifies the allocator used to allocate the stack. |
| in | stackBottom |
Specifies the bottom of the stack to use when releasing the stack. |
Performs initialization.
Specifies the allocator that will actually perform memory allocation.
The allocator specified for pAllocator must be maintained until the call to the Finalize function. Since the allocator can be accessed from multiple threads, it must be thread-safe. Further, the allocator must be able to allocate memory regions aligned to 0x1000-byte boundaries. In the Construct function, the value 0x1000 is passed to the second argument of pAllocator->Allocate.
When the stack is released, stackBottom is used as the stack. Within the Destruct member functions, pAllocator->Free is called after the stack has been replaced by stackBottom. For this reason, the size of the stack pointed to by stackBottom must match the stack size used by pAllocator->Free.
CONFIDENTIAL