Public Member Functions | Public Attributes | Private Attributes
rtflann::PooledAllocator Class Reference

#include <allocator.h>

List of all members.

Public Member Functions

template<typename T >
Tallocate (size_t count=1)
void * allocateMemory (int size)
void free ()
 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 75 of file allocator.h.


Constructor & Destructor Documentation

Default constructor. Initializes a new pool.

Definition at line 96 of file allocator.h.

Destructor. Frees all the memory allocated in this pool.

Definition at line 109 of file allocator.h.


Member Function Documentation

template<typename T >
T* rtflann::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 187 of file allocator.h.

void* rtflann::PooledAllocator::allocateMemory ( 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 132 of file allocator.h.

void rtflann::PooledAllocator::free ( ) [inline]

Definition at line 114 of file allocator.h.


Member Data Documentation

Definition at line 84 of file allocator.h.

Definition at line 86 of file allocator.h.

Definition at line 85 of file allocator.h.

Definition at line 83 of file allocator.h.

Definition at line 90 of file allocator.h.

Definition at line 91 of file allocator.h.


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


rtabmap
Author(s): Mathieu Labbe
autogenerated on Thu Jun 6 2019 21:59:43