Public Member Functions | Public Attributes
cvflann::PooledAllocator Class Reference

#include <allocator.h>

List of all members.

Public Member Functions

 PooledAllocator (int blocksize=BLOCKSIZE)
 ~PooledAllocator ()
voidallocateBytes (int size)
template<typename T >
Tallocate (size_t count=1)

Public Attributes

int usedMemory
int wastedMemory

Constructor & Destructor Documentation

Default constructor. Initializes a new pool.

Destructor. Frees all the memory allocated in this pool.


Member Function Documentation

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

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


Member Data Documentation


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