Intel(R) Threading Building Blocks Doxygen Documentation
version 4.2.3
|
Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5. More...
#include <tbb_allocator.h>
Classes | |
struct | rebind |
Public Types | |
enum | malloc_type { scalable, standard } |
Specifies current allocator. More... | |
typedef internal::allocator_type< T >::value_type | 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 ptrdiff_t | difference_type |
Public Member Functions | |
tbb_allocator () throw () | |
tbb_allocator (const tbb_allocator &) throw () | |
template<typename U > | |
tbb_allocator (const tbb_allocator< U > &) throw () | |
pointer | address (reference x) const |
const_pointer | address (const_reference x) const |
pointer | allocate (size_type n, const void *=0) |
Allocate space for n objects. More... | |
void | deallocate (pointer p, size_type) |
Free previously allocated block of memory. More... | |
size_type | max_size () const throw () |
Largest value for which method allocate might succeed. More... | |
template<typename U , typename... Args> | |
void | construct (U *p, Args &&... args) |
Copy-construct value at location pointed to by p. More... | |
void | destroy (pointer p) |
Destroy value at location pointed to by p. More... | |
Static Public Member Functions | |
static malloc_type | allocator_type () |
Returns current allocator. More... | |
Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5.
The class selects the best memory allocation mechanism available from scalable_malloc and standard malloc. The members are ordered the same way they are in section 20.4.1 of the ISO C++ standard.
Definition at line 58 of file tbb_allocator.h.
typedef const value_type* tbb::tbb_allocator< T >::const_pointer |
Definition at line 62 of file tbb_allocator.h.
typedef const value_type& tbb::tbb_allocator< T >::const_reference |
Definition at line 64 of file tbb_allocator.h.
typedef ptrdiff_t tbb::tbb_allocator< T >::difference_type |
Definition at line 66 of file tbb_allocator.h.
typedef value_type* tbb::tbb_allocator< T >::pointer |
Definition at line 61 of file tbb_allocator.h.
typedef value_type& tbb::tbb_allocator< T >::reference |
Definition at line 63 of file tbb_allocator.h.
typedef size_t tbb::tbb_allocator< T >::size_type |
Definition at line 65 of file tbb_allocator.h.
typedef internal::allocator_type<T>::value_type tbb::tbb_allocator< T >::value_type |
Definition at line 60 of file tbb_allocator.h.
enum tbb::tbb_allocator::malloc_type |
Specifies current allocator.
Enumerator | |
---|---|
scalable | |
standard |
Definition at line 72 of file tbb_allocator.h.
|
inline |
Definition at line 77 of file tbb_allocator.h.
|
inline |
Definition at line 78 of file tbb_allocator.h.
|
inline |
Definition at line 79 of file tbb_allocator.h.
|
inline |
Definition at line 81 of file tbb_allocator.h.
|
inline |
Definition at line 82 of file tbb_allocator.h.
|
inline |
Allocate space for n objects.
Definition at line 85 of file tbb_allocator.h.
References tbb::internal::allocate_via_handler_v3().
Referenced by tbb::interface6::internal::token_helper< T, true >::create_token().
|
inlinestatic |
Returns current allocator.
Definition at line 116 of file tbb_allocator.h.
References tbb::internal::is_malloc_used_v3(), tbb::tbb_allocator< T >::scalable, and tbb::tbb_allocator< T >::standard.
|
inline |
Copy-construct value at location pointed to by p.
Definition at line 103 of file tbb_allocator.h.
References p.
|
inline |
Free previously allocated block of memory.
Definition at line 90 of file tbb_allocator.h.
References tbb::internal::deallocate_via_handler_v3(), and p.
Referenced by tbb::interface6::internal::token_helper< T, true >::destroy_token().
|
inline |
Destroy value at location pointed to by p.
Definition at line 113 of file tbb_allocator.h.
References p.
Referenced by tbb::interface6::internal::token_helper< T, true >::destroy_token().
|
inline |
Largest value for which method allocate might succeed.
Definition at line 95 of file tbb_allocator.h.
References tbb::internal::max().