cvflann::PooledAllocator Class Reference

#include <allocator.h>

List of all members.

Public Member Functions

template<typename T >
T * allocate (size_t count=1)
void * allocateBytes (int size)
 PooledAllocator (int blocksize=BLOCKSIZE)
 ~PooledAllocator ()

Public Attributes

int usedMemory
int wastedMemory

Private Attributes

void * base
int blocksize
void * loc
int remaining

Detailed Description

Definition at line 73 of file allocator.h.


Constructor & Destructor Documentation

cvflann::PooledAllocator::PooledAllocator ( int  blocksize = BLOCKSIZE  )  [inline]

Default constructor. Initializes a new pool.

Definition at line 94 of file allocator.h.

cvflann::PooledAllocator::~PooledAllocator (  )  [inline]

Destructor. Frees all the memory allocated in this pool.

Definition at line 107 of file allocator.h.


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

Definition at line 177 of file allocator.h.

void* cvflann::PooledAllocator::allocateBytes ( int  size  )  [inline]

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

Definition at line 122 of file allocator.h.


Member Data Documentation

Definition at line 82 of file allocator.h.

Definition at line 84 of file allocator.h.

Definition at line 83 of file allocator.h.

Definition at line 81 of file allocator.h.

Definition at line 88 of file allocator.h.

Definition at line 89 of file allocator.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines


opencv2
Author(s): Gary Bradski and many others. See web page for a full contributor list. ROS package maintained by James Bowman.
autogenerated on Fri Jan 11 10:00:49 2013