Generic Allocator with pools. More...
#include <btGenericPoolAllocator.h>
Public Member Functions | |
void * | allocate (size_t size_bytes) |
Allocates memory in pool. | |
btGenericPoolAllocator (size_t pool_element_size, size_t pool_element_count) | |
bool | freeMemory (void *pointer) |
size_t | get_pool_capacity () |
virtual | ~btGenericPoolAllocator () |
Public Attributes | |
size_t | m_pool_count |
btGenericMemoryPool * | m_pools [BT_DEFAULT_MAX_POOLS] |
Protected Member Functions | |
void * | failback_alloc (size_t size_bytes) |
bool | failback_free (void *pointer) |
btGenericMemoryPool * | push_new_pool () |
Protected Attributes | |
size_t | m_pool_element_count |
size_t | m_pool_element_size |
Generic Allocator with pools.
General purpose Allocator which can create Memory Pools dynamiacally as needed.
Definition at line 113 of file btGenericPoolAllocator.h.
btGenericPoolAllocator::btGenericPoolAllocator | ( | size_t | pool_element_size, |
size_t | pool_element_count | ||
) | [inline] |
Definition at line 138 of file btGenericPoolAllocator.h.
virtual btGenericPoolAllocator::~btGenericPoolAllocator | ( | ) | [virtual] |
void* btGenericPoolAllocator::allocate | ( | size_t | size_bytes | ) |
Allocates memory in pool.
size_bytes | size in bytes of the buffer |
void* btGenericPoolAllocator::failback_alloc | ( | size_t | size_bytes | ) | [protected] |
bool btGenericPoolAllocator::failback_free | ( | void * | pointer | ) | [protected] |
bool btGenericPoolAllocator::freeMemory | ( | void * | pointer | ) |
size_t btGenericPoolAllocator::get_pool_capacity | ( | ) | [inline] |
Definition at line 123 of file btGenericPoolAllocator.h.
btGenericMemoryPool* btGenericPoolAllocator::push_new_pool | ( | ) | [protected] |
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.
Definition at line 119 of file btGenericPoolAllocator.h.