OpenCV  3.3.1
Open Source Computer Vision
Public Member Functions | Public Attributes | List of all members
cvflann::PooledAllocator Class Reference

#include "allocator.h"

Public Member Functions

 PooledAllocator (int blockSize=BLOCKSIZE)
 ~PooledAllocator ()
template<typename T >
Tallocate (size_t count=1)
void * allocateMemory (int size)

Public Attributes

int usedMemory
int wastedMemory

Constructor & Destructor Documentation

§ PooledAllocator()

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

Default constructor. Initializes a new pool.

§ ~PooledAllocator()

cvflann::PooledAllocator::~PooledAllocator ( )

Destructor. Frees all the memory allocated in this pool.

Member Function Documentation

§ allocate()

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

Allocates (using this pool) a generic type T.

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

§ allocateMemory()

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

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

Member Data Documentation

§ usedMemory

int cvflann::PooledAllocator::usedMemory

§ wastedMemory

int cvflann::PooledAllocator::wastedMemory

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