Osiris Framework  0.2
OMemoryPoolObject< blockSize, segmentSize > Class Template Reference

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 OMemoryPoolmemoryPool ()
 

Detailed Description

template<size_t blockSize, size_t segmentSize>
class OMemoryPoolObject< blockSize, segmentSize >

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.

Template Parameters
blockSizeBlock size in bytes.
segmentSizeNumber of blocks in a segment.

The documentation for this class was generated from the following file: