CreateHeap creates a nested child heap. The heap should be destroyed by calling Release. The method returns 0 if child heap creation failed due to out-of-memory condition. If the child heap is not supported, a pointer to the same parent heap will be returned.
Parameters |
Description |
const char* name |
Name of the heap. |
const HeapDesc& desc |
Reference to HeapDesc for obtaining information on the heap. |
unsigned flags = 0 |
Flags set to indicate the nature of the heap. See HeapFlags. |
UPInt minAlign = 16 |
Minimum alignment for the heap. |
UPInt granularity = 16*1024 |
Granularity size of the heap. Default value assigned is 16*1024. |
UPInt reserve = 16*1024 |
Block of memory maintained as reserve. Default value assigned is 8*1024. |
UPInt threshold = ~UPInt(0) |
Threshold value set as the maximum allocation size for the heap. |
UPInt limit = 0 |
Limit on the amount of memory used. |
UPInt heapId = 0 |
Id associated with the heap. |
UPInt arena = 0 |
Id of the memory arena used for the heap. |
Nested child heap if supported otherwise the parent heap.