theCore C++ embedded framework
|
Almost stateless pool allocator. More...
#include </home/travis/build/forGGe/theCore/lib/allocators/export/ecl/pool.hpp>
Public Member Functions | |
pool_allocator (pool_base *pool) | |
Constructs pool allocator with memory pool given. More... | |
~pool_allocator () | |
Deallocates allocator. More... | |
T * | allocate (size_t n) |
Allocates memory for given object count. More... | |
void | deallocate (T *p, size_t n) |
template<typename U > | |
pool_allocator< U > | rebind () const |
Create new instanse of the allocator, suitable for a new type. More... | |
pool_allocator & | operator= (const pool_allocator &)=default |
pool_allocator (const pool_allocator &)=default | |
Almost stateless pool allocator.
Provides the interface for shared memory pool.
Type | for whom memory should be allocated. |
|
explicit |
Constructs pool allocator with memory pool given.
[in] | pool | Memory pool to use with this allocator. |
ecl::pool_allocator< T >::~pool_allocator | ( | ) |
Deallocates allocator.
|
default |
T * ecl::pool_allocator< T >::allocate | ( | size_t | n | ) |
Allocates memory for given object count.
[in] | n | Objects count. |
void ecl::pool_allocator< T >::deallocate | ( | T * | p, |
size_t | n | ||
) |
pool_allocator< U > ecl::pool_allocator< T >::rebind | ( | ) | const |
Create new instanse of the allocator, suitable for a new type.
U | A new allocator type. |
|
default |