OpenCV  4.1.1-pre
Open Source Computer Vision
Looking for a C++ dev who knows OpenCV?
I'm looking for work. Hire me!
cvflann::PooledAllocator Class Reference

#include <opencv2/flann/allocator.h>

Collaboration diagram for cvflann::PooledAllocator:

Public Member Functions

 PooledAllocator (int blockSize=BLOCKSIZE)
 Default constructor. More...
 
 ~PooledAllocator ()
 Destructor. More...
 
template<typename T >
T * allocate (size_t count=1)
 Allocates (using this pool) a generic type T. More...
 
void * allocateMemory (int size)
 Returns a pointer to a piece of new memory of the given size in bytes allocated from the pool. More...
 

Public Attributes

int usedMemory
 
int wastedMemory
 

Constructor & Destructor Documentation

◆ PooledAllocator()

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

Default constructor.

Initializes a new pool.

Referenced by allocate().

Here is the caller graph for this function:

◆ ~PooledAllocator()

cvflann::PooledAllocator::~PooledAllocator ( )
inline

Destructor.

Frees all the memory allocated in this pool.

Member Function Documentation

◆ allocate()

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

References allocateMemory(), and PooledAllocator().

Here is the call graph for this function:

◆ allocateMemory()

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.

References cvflann::BLOCKSIZE.

Referenced by allocate().

Here is the caller graph for this function:

Member Data Documentation

◆ usedMemory

int cvflann::PooledAllocator::usedMemory

◆ wastedMemory

int cvflann::PooledAllocator::wastedMemory

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