QuantumLibrary
|
Provides fast (quasi zero-time) in-place allocation for STL containers. Objects are allocated from a contiguous buffer (aka object pool). When the buffer is exhausted, allocation is delegated to the heap. The default buffer size is 1000. More...
#include <quantum_contiguous_pool_manager.h>
Public Types | |
typedef ContiguousPoolManager< T > | this_type |
typedef T | value_type |
typedef value_type * | pointer |
typedef const value_type * | const_pointer |
typedef value_type & | reference |
typedef const value_type & | const_reference |
typedef size_t | size_type |
typedef uint16_t | index_type |
typedef std::aligned_storage< sizeof(T), alignof(T)> | storage_type |
typedef storage_type::type | aligned_type |
Public Member Functions | |
ContiguousPoolManager () | |
ContiguousPoolManager (aligned_type *buffer, index_type size) | |
ContiguousPoolManager (const this_type &)=delete | |
ContiguousPoolManager (this_type &&) | |
ContiguousPoolManager & | operator= (const this_type &)=delete |
ContiguousPoolManager & | operator= (this_type &&) |
virtual | ~ContiguousPoolManager () |
void | setBuffer (aligned_type *buffer, index_type size) |
pointer | address (reference x) const |
const_pointer | address (const_reference x) const |
size_type | max_size () const |
template<typename... Args> | |
void | construct (T *p, Args &&... args) |
void | destroy (pointer p) |
pointer | allocate (size_type=1, const_pointer=0) |
void | deallocate (pointer p, size_type=1) |
template<typename... Args> | |
pointer | create (Args &&... args) |
void | dispose (pointer p) |
size_t | allocatedBlocks () const |
size_t | allocatedHeapBlocks () const |
bool | isFull () const |
bool | isEmpty () const |
Provides fast (quasi zero-time) in-place allocation for STL containers. Objects are allocated from a contiguous buffer (aka object pool). When the buffer is exhausted, allocation is delegated to the heap. The default buffer size is 1000.
T | The type to allocate. |
typedef storage_type::type Bloomberg::quantum::ContiguousPoolManager< T >::aligned_type |
typedef const value_type* Bloomberg::quantum::ContiguousPoolManager< T >::const_pointer |
typedef const value_type& Bloomberg::quantum::ContiguousPoolManager< T >::const_reference |
typedef uint16_t Bloomberg::quantum::ContiguousPoolManager< T >::index_type |
typedef value_type* Bloomberg::quantum::ContiguousPoolManager< T >::pointer |
typedef value_type& Bloomberg::quantum::ContiguousPoolManager< T >::reference |
typedef size_t Bloomberg::quantum::ContiguousPoolManager< T >::size_type |
typedef std::aligned_storage<sizeof(T), alignof(T)> Bloomberg::quantum::ContiguousPoolManager< T >::storage_type |
typedef ContiguousPoolManager<T> Bloomberg::quantum::ContiguousPoolManager< T >::this_type |
typedef T Bloomberg::quantum::ContiguousPoolManager< T >::value_type |
Bloomberg::quantum::ContiguousPoolManager< T >::ContiguousPoolManager | ( | ) |
Bloomberg::quantum::ContiguousPoolManager< T >::ContiguousPoolManager | ( | aligned_type * | buffer, |
index_type | size | ||
) |
|
delete |
Bloomberg::quantum::ContiguousPoolManager< T >::ContiguousPoolManager | ( | this_type && | other | ) |
|
virtual |
ContiguousPoolManager< T >::pointer Bloomberg::quantum::ContiguousPoolManager< T >::address | ( | reference | x | ) | const |
ContiguousPoolManager< T >::const_pointer Bloomberg::quantum::ContiguousPoolManager< T >::address | ( | const_reference | x | ) | const |
ContiguousPoolManager< T >::pointer Bloomberg::quantum::ContiguousPoolManager< T >::allocate | ( | size_type | n = 1 , |
const_pointer | = 0 |
||
) |
size_t Bloomberg::quantum::ContiguousPoolManager< T >::allocatedBlocks | ( | ) | const |
size_t Bloomberg::quantum::ContiguousPoolManager< T >::allocatedHeapBlocks | ( | ) | const |
void Bloomberg::quantum::ContiguousPoolManager< T >::construct | ( | T * | p, |
Args &&... | args | ||
) |
ContiguousPoolManager< T >::pointer Bloomberg::quantum::ContiguousPoolManager< T >::create | ( | Args &&... | args | ) |
void Bloomberg::quantum::ContiguousPoolManager< T >::deallocate | ( | pointer | p, |
size_type | n = 1 |
||
) |
void Bloomberg::quantum::ContiguousPoolManager< T >::destroy | ( | pointer | p | ) |
void Bloomberg::quantum::ContiguousPoolManager< T >::dispose | ( | pointer | p | ) |
bool Bloomberg::quantum::ContiguousPoolManager< T >::isEmpty | ( | ) | const |
bool Bloomberg::quantum::ContiguousPoolManager< T >::isFull | ( | ) | const |
ContiguousPoolManager< T >::size_type Bloomberg::quantum::ContiguousPoolManager< T >::max_size | ( | ) | const |
|
delete |
ContiguousPoolManager< T > & Bloomberg::quantum::ContiguousPoolManager< T >::operator= | ( | this_type && | other | ) |
void Bloomberg::quantum::ContiguousPoolManager< T >::setBuffer | ( | aligned_type * | buffer, |
index_type | size | ||
) |