Pool backed allocator.
More...
|
struct | rebind |
| Provides a way to obtain an allocator for a different type. More...
|
|
|
| pool_allocator (pool_allocator const &)=default |
|
template<typename U > |
| pool_allocator (pool_allocator< U, N > const &other) noexcept |
|
pointer | allocate (size_type n, typename pool_allocator< void, N >::const_pointer hint=0) |
|
void | deallocate (pointer p, size_type n) |
|
|
typedef std::size_t | size_type |
|
typedef std::ptrdiff_t | difference_type |
|
typedef T * | pointer |
|
typedef const T * | const_pointer |
|
typedef T & | reference |
|
typedef T const & | const_reference |
|
typedef T | value_type |
|
|
template<typename , std::size_t > |
class | pool_allocator |
|
template<typename T, std::size_t N>
class stapl::pool_allocator< T, N >
Pool backed allocator.
Allocator that uses pool allocation for small (<= N
bytes) allocations, backed by the runtime::memory_allocator. For larger allocations, it redirects to the standard allocator.
- Warning
- This allocator may increase your memory consumption, as memory reserved by a pool cannot be used by the rest of the program.
-
Memory allocated from this allocator can only be freed in the same thread it was allocated from.
The documentation for this class was generated from the following file: