Bullet Collision Detection & Physics Library
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
btGenericPoolAllocator Class Reference

Generic Allocator with pools. More...

#include <btGenericPoolAllocator.h>

Inheritance diagram for btGenericPoolAllocator:
Inheritance graph
[legend]
Collaboration diagram for btGenericPoolAllocator:
Collaboration graph
[legend]

Public Member Functions

size_t get_pool_capacity ()
 
 btGenericPoolAllocator (size_t pool_element_size, size_t pool_element_count)
 
virtual ~btGenericPoolAllocator ()
 *******************! btGenericPoolAllocator *******************!/// More...
 
void * allocate (size_t size_bytes)
 Allocates memory in pool. More...
 
bool freeMemory (void *pointer)
 

Public Attributes

btGenericMemoryPoolm_pools [BT_DEFAULT_MAX_POOLS]
 
size_t m_pool_count
 

Protected Member Functions

btGenericMemoryPoolpush_new_pool ()
 
void * failback_alloc (size_t size_bytes)
 
bool failback_free (void *pointer)
 

Protected Attributes

size_t m_pool_element_size
 
size_t m_pool_element_count
 

Detailed Description

Generic Allocator with pools.

General purpose Allocator which can create Memory Pools dynamiacally as needed.

Definition at line 113 of file btGenericPoolAllocator.h.

Constructor & Destructor Documentation

btGenericPoolAllocator::btGenericPoolAllocator ( size_t  pool_element_size,
size_t  pool_element_count 
)
inline

Definition at line 138 of file btGenericPoolAllocator.h.

btGenericPoolAllocator::~btGenericPoolAllocator ( )
virtual

*******************! btGenericPoolAllocator *******************!///

Definition at line 158 of file btGenericPoolAllocator.cpp.

Member Function Documentation

void * btGenericPoolAllocator::allocate ( size_t  size_bytes)

Allocates memory in pool.

Parameters
size_bytessize in bytes of the buffer

Definition at line 215 of file btGenericPoolAllocator.cpp.

void * btGenericPoolAllocator::failback_alloc ( size_t  size_bytes)
protected

Definition at line 185 of file btGenericPoolAllocator.cpp.

bool btGenericPoolAllocator::failback_free ( void *  pointer)
protected

Definition at line 204 of file btGenericPoolAllocator.cpp.

bool btGenericPoolAllocator::freeMemory ( void *  pointer)

Definition at line 231 of file btGenericPoolAllocator.cpp.

size_t btGenericPoolAllocator::get_pool_capacity ( )
inline

Definition at line 123 of file btGenericPoolAllocator.h.

btGenericMemoryPool * btGenericPoolAllocator::push_new_pool ( )
protected

Definition at line 171 of file btGenericPoolAllocator.cpp.

Member Data Documentation

size_t btGenericPoolAllocator::m_pool_count

Definition at line 120 of file btGenericPoolAllocator.h.

size_t btGenericPoolAllocator::m_pool_element_count
protected

Definition at line 117 of file btGenericPoolAllocator.h.

size_t btGenericPoolAllocator::m_pool_element_size
protected

Definition at line 116 of file btGenericPoolAllocator.h.

btGenericMemoryPool* btGenericPoolAllocator::m_pools[BT_DEFAULT_MAX_POOLS]

Definition at line 119 of file btGenericPoolAllocator.h.


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