Bullet Collision Detection & Physics Library
|
Generic Pool class. More...
#include <btGenericPoolAllocator.h>
Public Member Functions | |
void | init_pool (size_t element_size, size_t element_count) |
void | end_pool () |
btGenericMemoryPool (size_t element_size, size_t element_count) | |
~btGenericMemoryPool () | |
size_t | get_pool_capacity () |
size_t | gem_element_size () |
size_t | get_max_element_count () |
size_t | get_allocated_count () |
size_t | get_free_positions_count () |
void * | get_element_data (size_t element_index) |
void * | allocate (size_t size_bytes) |
Allocates memory in pool. More... | |
bool | freeMemory (void *pointer) |
Public Attributes | |
unsigned char * | m_pool |
size_t * | m_free_nodes |
size_t * | m_allocated_sizes |
size_t | m_allocated_count |
size_t | m_free_nodes_count |
Protected Member Functions | |
size_t | allocate_from_free_nodes (size_t num_elements) |
*************** btGenericMemoryPool ******************/////////// More... | |
size_t | allocate_from_pool (size_t num_elements) |
Protected Attributes | |
size_t | m_element_size |
size_t | m_max_element_count |
Generic Pool class.
Definition at line 34 of file btGenericPoolAllocator.h.
|
inline |
Definition at line 56 of file btGenericPoolAllocator.h.
|
inline |
Definition at line 61 of file btGenericPoolAllocator.h.
void * btGenericMemoryPool::allocate | ( | size_t | size_bytes | ) |
Allocates memory in pool.
size_bytes | size in bytes of the buffer |
Definition at line 119 of file btGenericPoolAllocator.cpp.
|
protected |
*************** btGenericMemoryPool ******************///////////
Definition at line 27 of file btGenericPoolAllocator.cpp.
|
protected |
Definition at line 71 of file btGenericPoolAllocator.cpp.
void btGenericMemoryPool::end_pool | ( | ) |
Definition at line 105 of file btGenericPoolAllocator.cpp.
bool btGenericMemoryPool::freeMemory | ( | void * | pointer | ) |
Definition at line 139 of file btGenericPoolAllocator.cpp.
|
inline |
Definition at line 72 of file btGenericPoolAllocator.h.
|
inline |
Definition at line 82 of file btGenericPoolAllocator.h.
|
inline |
Definition at line 92 of file btGenericPoolAllocator.h.
|
inline |
Definition at line 87 of file btGenericPoolAllocator.h.
|
inline |
Definition at line 77 of file btGenericPoolAllocator.h.
|
inline |
Definition at line 67 of file btGenericPoolAllocator.h.
void btGenericMemoryPool::init_pool | ( | size_t | element_size, |
size_t | element_count | ||
) |
Definition at line 84 of file btGenericPoolAllocator.cpp.
size_t btGenericMemoryPool::m_allocated_count |
Definition at line 40 of file btGenericPoolAllocator.h.
size_t* btGenericMemoryPool::m_allocated_sizes |
Definition at line 39 of file btGenericPoolAllocator.h.
|
protected |
Definition at line 43 of file btGenericPoolAllocator.h.
size_t* btGenericMemoryPool::m_free_nodes |
Definition at line 38 of file btGenericPoolAllocator.h.
size_t btGenericMemoryPool::m_free_nodes_count |
Definition at line 41 of file btGenericPoolAllocator.h.
|
protected |
Definition at line 44 of file btGenericPoolAllocator.h.
unsigned char* btGenericMemoryPool::m_pool |
Definition at line 37 of file btGenericPoolAllocator.h.