Memory Manager
C4Memory.h

class Memory

The Memory class template is used to cause objects to be allocated in a dedicated heap.
Definition

template <class type> class Memory

Template Parameters
type The type of object with which the dedicated heap is associated.
Constructor

Memory();

The constructor has protected access. The Memory class can only exist as a base class for another class type.
Description
The Memory class template is used as a base class for objects that are to be allocated in a dedicated heap. As an example, if all instances of a class Foo should be allocated in a dedicated heap for that class, then Foo should inherit from Memory<Foo> as follows.

class Foo : public Memory<Foo>

This causes instances of the class Foo to be allocated in the heap associated with the Memory<Foo> base class whenever the new operator is used to create them. The heap itself needs to be defined in the program as follows.

template <> Heap Memory<Foo>::heap("HeapName", poolSize);

(See the constructor for the Heap class.)
See Also
Heap