btPoolAllocator Class Reference

The btPoolAllocator class allows to efficiently allocate a large pool of objects, instead of dynamically allocating them separately. More...

#include <btPoolAllocator.h>

List of all members.

Public Member Functions

void * allocate (int size)
 btPoolAllocator (int elemSize, int maxElements)
void freeMemory (void *ptr)
int getElementSize () const
int getFreeCount () const
bool validPtr (void *ptr)
 ~btPoolAllocator ()

Private Attributes

int m_elemSize
void * m_firstFree
int m_freeCount
int m_maxElements
unsigned char * m_pool

Detailed Description

The btPoolAllocator class allows to efficiently allocate a large pool of objects, instead of dynamically allocating them separately.

Definition at line 23 of file btPoolAllocator.h.


Constructor & Destructor Documentation

btPoolAllocator::btPoolAllocator ( int  elemSize,
int  maxElements 
) [inline]

Definition at line 33 of file btPoolAllocator.h.

btPoolAllocator::~btPoolAllocator (  )  [inline]

Definition at line 50 of file btPoolAllocator.h.


Member Function Documentation

void* btPoolAllocator::allocate ( int  size  )  [inline]

Definition at line 60 of file btPoolAllocator.h.

void btPoolAllocator::freeMemory ( void *  ptr  )  [inline]

Definition at line 83 of file btPoolAllocator.h.

int btPoolAllocator::getElementSize (  )  const [inline]

Definition at line 94 of file btPoolAllocator.h.

int btPoolAllocator::getFreeCount (  )  const [inline]

Definition at line 55 of file btPoolAllocator.h.

bool btPoolAllocator::validPtr ( void *  ptr  )  [inline]

Definition at line 72 of file btPoolAllocator.h.


Member Data Documentation

Definition at line 25 of file btPoolAllocator.h.

Definition at line 28 of file btPoolAllocator.h.

Definition at line 27 of file btPoolAllocator.h.

Definition at line 26 of file btPoolAllocator.h.

unsigned char* btPoolAllocator::m_pool [private]

Definition at line 29 of file btPoolAllocator.h.


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


bullet
Author(s): Erwin Coumans, ROS package maintained by Tully Foote
autogenerated on Fri Jan 11 10:11:05 2013