Intel(R) Threading Building Blocks Doxygen Documentation
version 4.2.3
|
Thread-safe growable pool allocator for variable-size requests. More...
#include <memory_pool.h>
Public Member Functions | |
memory_pool (const Alloc &src=Alloc()) | |
construct pool with underlying allocator More... | |
~memory_pool () | |
destroy pool More... | |
![]() | |
void | recycle () |
Reset pool to reuse its memory (free all objects at once) More... | |
void * | malloc (size_t size) |
The "malloc" analogue to allocate block of memory of size bytes. More... | |
void | free (void *ptr) |
The "free" analogue to discard a previously allocated piece of memory. More... | |
void * | realloc (void *ptr, size_t size) |
The "realloc" analogue complementing pool_malloc. More... | |
Static Private Member Functions | |
static void * | allocate_request (intptr_t pool_id, size_t &bytes) |
static int | deallocate_request (intptr_t pool_id, void *, size_t raw_bytes) |
Private Attributes | |
Alloc | my_alloc |
Additional Inherited Members | |
![]() | |
void | destroy () |
destroy pool - must be called in a child class More... | |
![]() | |
rml::MemoryPool * | my_pool |
Thread-safe growable pool allocator for variable-size requests.
Definition at line 188 of file memory_pool.h.
|
explicit |
construct pool with underlying allocator
Definition at line 217 of file memory_pool.h.
References tbb::interface6::memory_pool< Alloc >::allocate_request(), tbb::interface6::memory_pool< Alloc >::deallocate_request(), tbb::interface6::internal::pool_base::my_pool, and tbb::internal::throw_exception().
|
inline |
destroy pool
Definition at line 198 of file memory_pool.h.
References tbb::interface6::internal::pool_base::destroy().
|
staticprivate |
Definition at line 225 of file memory_pool.h.
References __TBB_CATCH, __TBB_TRY, and __TBBMALLOC_ASSERT.
Referenced by tbb::interface6::memory_pool< Alloc >::memory_pool().
|
staticprivate |
Definition at line 241 of file memory_pool.h.
References __TBBMALLOC_ASSERT.
Referenced by tbb::interface6::memory_pool< Alloc >::memory_pool().
|
private |
Definition at line 189 of file memory_pool.h.