Facebook Twitter YouTube

class Heap

Defined in:  TSMemory.h
The Heap class encapsulates a memory allocation heap.

class Heap

Member Functions
Heap::GetTotalSize Returns the total size of allocated blocks in a heap.

Heap(const char *name = nullptrunsigned_int32 pool = kMemoryDefaultPoolSize, unsigned_int32 flags = 0);

name The name of the heap.
pool The size of the memory pools allocated in the heap, in bytes.
flags The heap flags. See below for possible values.
The Heap class organizes a set of memory pools from which blocks of memory are allocated by the Memory Manager. Heaps are generally managed internally by the engine, but it is possible to create new dedicated heaps for custom class types by subclassing from the Memory class.

The flags parameter can be a combination (through logical OR) of the following constants.
kHeapMutexless Do not use a mutex to protect the heap from simultaneous access from multiple threads.
See Also