Osiris Framework
0.3
|
Template class for objects that use memory pools. More...
#include <OsirisSDK/OMemoryPoolObject.hpp>
Public Member Functions | |
OMemoryPoolObject () | |
Class constructor. | |
virtual | ~OMemoryPoolObject () |
Class destructor. | |
void * | operator new (size_t sz) |
void | operator delete (void *ptr) |
Static Public Member Functions | |
static OMemoryPool * | memoryPool () |
Template class for objects that use memory pools.
Classes of this type can take advantage of memory pools to avoid frequent malloc() and free() calls, avoiding heap fragmentation. Inheriting this template class will overload new and delete operators.
blockSize | Block size in bytes. |
segmentSize | Number of blocks in a segment. |