OpenCV  2.4.13
Open Source Computer Vision
cvflann::PooledAllocator Class Reference

#include <allocator.h>

Public Member Functions

 PooledAllocator (int blockSize=BLOCKSIZE)
 
 ~PooledAllocator ()
 
voidallocateMemory (int size)
 
template<typename T >
T * allocate (size_t count=1)
 

Public Attributes

int usedMemory
 
int wastedMemory
 

Constructor & Destructor Documentation

cvflann::PooledAllocator::PooledAllocator ( int  blockSize = BLOCKSIZE)
inline

Default constructor. Initializes a new pool.

cvflann::PooledAllocator::~PooledAllocator ( )
inline

Destructor. Frees all the memory allocated in this pool.

Member Function Documentation

template<typename T >
T* cvflann::PooledAllocator::allocate ( size_t  count = 1)
inline

Allocates (using this pool) a generic type T.

Params: count = number of instances to allocate. Returns: pointer (of type T*) to memory buffer

void* cvflann::PooledAllocator::allocateMemory ( int  size)
inline

Returns a pointer to a piece of new memory of the given size in bytes allocated from the pool.

Member Data Documentation

int cvflann::PooledAllocator::usedMemory
int cvflann::PooledAllocator::wastedMemory

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