Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | Related Pages

tbb::tbb_allocator< T > Class Template Reference

Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5 More...

#include <tbb_allocator.h>

List of all members.

Public Types

typedef T * pointer
typedef const T * const_pointer
typedef T & reference
typedef const T & const_reference
typedef T value_type
typedef size_t size_type
typedef ptrdiff_t difference_type
enum  malloc_type { scalable, standard }
 Specifies current allocator.

Public Member Functions

 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, starting on a cache/sector line.
void deallocate (pointer p, size_type)
 Free block of memory that starts on a cache line.
size_type max_size () const throw ()
 Largest value for which method allocate might succeed.
void construct (pointer p, const T &value)
 Copy-construct value at location pointed to by p.
void destroy (pointer p)
 Destroy value at location pointed to by p.

Static Public Member Functions

malloc_type allocator_type ()
 Returns current allocator.


Detailed Description

template<typename T>
class tbb::tbb_allocator< T >

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.


The documentation for this class was generated from the following file:

Copyright © 2005-2008 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

* Other names and brands may be claimed as the property of others.