nn::fnd::ExpHeapTemplate::Allocate Member Function
void * Allocate(
size_t byteSize,
s32 alignment = DEFAULT_ALIGNMENT,
bit8 groupId = 0,
AllocationMode mode = ALLOCATION_MODE_FIRST_FIT,
bool reuse = false
);
| Name | Description | |
|---|---|---|
| in | byteSize | Specifies the size (in bytes) of the memory block to allocate. |
| in | alignment | Specifies the alignment. You can specify a power of two between -128 and 128 with an absolute value of 4 or greater. |
| in | groupId | Specifies the group ID. |
| in | mode | Specifies the mode to use for memory block allocation. |
| in | reuse | Specifies whether to reuse the gaps in memory that occur during alignment. |
Allocates memory from the expanded heap.
The following values can be specified in alignment: -128, -64, -32, -16, -8, -4, 4, 8, 16, 32, 64, and 128.
This function starts searching at the beginning of the heap (if alignment is positive) or at the end of the heap (if alignment is negative), and then allocates the free region that it finds.
-4096 and 4096. Added information on the meanings of positive and negative alignment values.
-128 through 128.CONFIDENTIAL