MemoryHeap::HeapDesc

MemoryHeap::HeapDesc
Description

Provides description of memory heap created.

Data Members
Data Member 
Description 
Granularity represents the smallest block size that the heap will request from the "root" heap memory system, which ultimately routes to SysAlloc/SysAllocPaged. In other words, this is the size multiple by which the heap will grow. For example, with the default value of 16K, the first allocation of 10 bytes on the heap will allocate a 16K block; from that point on all of the further heap allocations will be serviced from that block until it is exhausted. Once exhausted, an additional block of granularity will be allocated. If all of the allocation within a block are... more 
If not 0, specifies the limit on the amount of memory used by heap. Any attempt to allocate more will fail returning null. Must be multiple of Granularity
Minimum alignment enforced for all allocations from heap. 
An arbitrary integer to associate the heap with additional information. In particular, the HeapId is associated with color to be displayed in the memory monitor. If the HeapId is 0, there are no associations but the heap will be displayed anyway. Heaps with Id will have guaranteed persistent colors to be easily distinguishable from other heaps. 
Capability flags such as thread safety, debug support, etc. 
Smallest maintained reserve, or pre-allocated reserve. Data within the reserve will not be given back to parent heap or system until the heap is released. Must be multiple of Granularity
Maximum amount of memory used by the heap and if the allocation size exceeds this threshold, the allocation is redirected directly to SysAlloc/SysAllocPaged
The memory arena used for this heap. The arena must be created by calling CreateArena.
Arena 0 is reserved for use by default, with the main SysAllocPaged/SysAlloc. The arena Ids must not be large because the system allocates an array of pointers of size 0...maxUsedArena. 
Methods
Method 
Description 
Clears and resets the parameters set for the memory heap to 0. 
Heap descriptor constructor for initializing a heap object. 
File

SF_MemoryHeap.h