Bullet Collision Detection & Physics Library: btGenericPoolAllocator Class Reference

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:
[legend]
Collaboration diagram for btGenericPoolAllocator:
[legend]

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

## Public Attributes
btGenericMemoryPool * | m_pools [BT_DEFAULT_MAX_POOLS]
size_t | m_pool_count

## Protected Member Functions
btGenericMemoryPool * | push_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 107 of file btGenericPoolAllocator.h.

## Constructor & Destructor Documentation

## ◆ btGenericPoolAllocator()

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

Definition at line 131 of file btGenericPoolAllocator.h.

## ◆ ~btGenericPoolAllocator()

btGenericPoolAllocator::~btGenericPoolAllocator | ( |  | ) |
| virtual

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

Definition at line 147 of file btGenericPoolAllocator.cpp.

## Member Function Documentation

## ◆ allocate()

void * btGenericPoolAllocator::allocate | ( | size_t | size_bytes | ) |

Allocates memory in pool.

Parameters

  size_bytes | size in bytes of the buffer

Definition at line 200 of file btGenericPoolAllocator.cpp.

## ◆ failback_alloc()

void * btGenericPoolAllocator::failback_alloc | ( | size_t | size_bytes | ) |
| protected

Definition at line 173 of file btGenericPoolAllocator.cpp.

## ◆ failback_free()

bool btGenericPoolAllocator::failback_free | ( | void * | pointer | ) |
| protected

Definition at line 190 of file btGenericPoolAllocator.cpp.

## ◆ freeMemory()

bool btGenericPoolAllocator::freeMemory | ( | void * | pointer | ) |

Definition at line 216 of file btGenericPoolAllocator.cpp.

## ◆ get_pool_capacity()

size_t btGenericPoolAllocator::get_pool_capacity | ( |  | ) |
| inline

Definition at line 117 of file btGenericPoolAllocator.h.

## ◆ push_new_pool()

btGenericMemoryPool * btGenericPoolAllocator::push_new_pool | ( |  | ) |
| protected

Definition at line 159 of file btGenericPoolAllocator.cpp.

## Member Data Documentation

## ◆ m_pool_count

size_t btGenericPoolAllocator::m_pool_count

Definition at line 115 of file btGenericPoolAllocator.h.

## ◆ m_pool_element_count

size_t btGenericPoolAllocator::m_pool_element_count
| protected

Definition at line 111 of file btGenericPoolAllocator.h.

## ◆ m_pool_element_size

size_t btGenericPoolAllocator::m_pool_element_size
| protected

Definition at line 110 of file btGenericPoolAllocator.h.

## ◆ m_pools

btGenericMemoryPool* btGenericPoolAllocator::m_pools[BT_DEFAULT_MAX_POOLS]

Definition at line 114 of file btGenericPoolAllocator.h.

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

- btGenericPoolAllocator.h
- btGenericPoolAllocator.cpp