Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
btGenericMemoryPool Class Reference

Generic Pool class. More...

#include <btGenericPoolAllocator.h>

List of all members.

Public Member Functions

void * allocate (size_t size_bytes)
 Allocates memory in pool.
 btGenericMemoryPool (size_t element_size, size_t element_count)
void end_pool ()
bool freeMemory (void *pointer)
size_t gem_element_size ()
size_t get_allocated_count ()
void * get_element_data (size_t element_index)
size_t get_free_positions_count ()
size_t get_max_element_count ()
size_t get_pool_capacity ()
void init_pool (size_t element_size, size_t element_count)
 ~btGenericMemoryPool ()

Public Attributes

size_t m_allocated_count
size_t * m_allocated_sizes
size_t * m_free_nodes
size_t m_free_nodes_count
unsigned char * m_pool

Protected Member Functions

size_t allocate_from_free_nodes (size_t num_elements)
size_t allocate_from_pool (size_t num_elements)

Protected Attributes

size_t m_element_size
size_t m_max_element_count

Detailed Description

Generic Pool class.

Definition at line 34 of file btGenericPoolAllocator.h.


Constructor & Destructor Documentation

btGenericMemoryPool::btGenericMemoryPool ( size_t  element_size,
size_t  element_count 
) [inline]

Definition at line 56 of file btGenericPoolAllocator.h.

Definition at line 61 of file btGenericPoolAllocator.h.


Member Function Documentation

void* btGenericMemoryPool::allocate ( size_t  size_bytes)

Allocates memory in pool.

Parameters:
size_bytessize in bytes of the buffer
size_t btGenericMemoryPool::allocate_from_free_nodes ( size_t  num_elements) [protected]
size_t btGenericMemoryPool::allocate_from_pool ( size_t  num_elements) [protected]
bool btGenericMemoryPool::freeMemory ( void *  pointer)

Definition at line 72 of file btGenericPoolAllocator.h.

Definition at line 82 of file btGenericPoolAllocator.h.

void* btGenericMemoryPool::get_element_data ( size_t  element_index) [inline]

Definition at line 92 of file btGenericPoolAllocator.h.

Definition at line 87 of file btGenericPoolAllocator.h.

Definition at line 77 of file btGenericPoolAllocator.h.

Definition at line 67 of file btGenericPoolAllocator.h.

void btGenericMemoryPool::init_pool ( size_t  element_size,
size_t  element_count 
)

Member Data Documentation

Definition at line 40 of file btGenericPoolAllocator.h.

Definition at line 39 of file btGenericPoolAllocator.h.

Definition at line 43 of file btGenericPoolAllocator.h.

Definition at line 38 of file btGenericPoolAllocator.h.

Definition at line 41 of file btGenericPoolAllocator.h.

Definition at line 44 of file btGenericPoolAllocator.h.

Definition at line 37 of file btGenericPoolAllocator.h.


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


bullet
Author(s): Erwin Coumans, ROS package maintained by Tully Foote
autogenerated on Wed Oct 31 2012 07:54:32