__gnu_cxx::__mt_alloc< _Tp, _Poolp > Class Template Reference

This is a fixed size (power of 2) allocator which - when compiled with thread support - will maintain one freelist per size per thread plus a "global" one. Steps are taken to limit the per thread freelist sizes (by returning excess back to the "global" list). More...

#include <mt_allocator.h>

Inheritance diagram for __gnu_cxx::__mt_alloc< _Tp, _Poolp >:

__gnu_cxx::__mt_alloc_base< _Tp > List of all members.

Public Types

typedef size_t size_type
typedef ptrdiff_t difference_type
typedef _Tp * pointer
typedef const _Tp * const_pointer
typedef _Tp & reference
typedef const _Tp & const_reference
typedef _Tp value_type
typedef _Poolp __policy_type
typedef _Poolp::pool_type __pool_type

Public Member Functions

 __mt_alloc () throw ()
 __mt_alloc (const __mt_alloc &) throw ()
template<typename _Tp1, typename _Poolp1>
 __mt_alloc (const __mt_alloc< _Tp1, _Poolp1 > &) throw ()
 ~__mt_alloc () throw ()
pointer allocate (size_type __n, const void *=0)
void deallocate (pointer __p, size_type __n)
const __pool_base::_Tune _M_get_options ()
void _M_set_options (__pool_base::_Tune __t)

Classes

struct  rebind

Detailed Description

template<typename _Tp, typename _Poolp = __common_pool_policy<__pool, __thread_default>>
class __gnu_cxx::__mt_alloc< _Tp, _Poolp >

This is a fixed size (power of 2) allocator which - when compiled with thread support - will maintain one freelist per size per thread plus a "global" one. Steps are taken to limit the per thread freelist sizes (by returning excess back to the "global" list).

Further details: http://gcc.gnu.org/onlinedocs/libstdc++/ext/mt_allocator.html

Definition at line 613 of file mt_allocator.h.


Member Typedef Documentation

template<typename _Tp, typename _Poolp = __common_pool_policy<__pool, __thread_default>>
typedef _Poolp __gnu_cxx::__mt_alloc< _Tp, _Poolp >::__policy_type

Definition at line 623 of file mt_allocator.h.

template<typename _Tp, typename _Poolp = __common_pool_policy<__pool, __thread_default>>
typedef _Poolp::pool_type __gnu_cxx::__mt_alloc< _Tp, _Poolp >::__pool_type

Definition at line 624 of file mt_allocator.h.

template<typename _Tp, typename _Poolp = __common_pool_policy<__pool, __thread_default>>
typedef const _Tp* __gnu_cxx::__mt_alloc< _Tp, _Poolp >::const_pointer

Reimplemented from __gnu_cxx::__mt_alloc_base< _Tp >.

Definition at line 619 of file mt_allocator.h.

template<typename _Tp, typename _Poolp = __common_pool_policy<__pool, __thread_default>>
typedef const _Tp& __gnu_cxx::__mt_alloc< _Tp, _Poolp >::const_reference

Reimplemented from __gnu_cxx::__mt_alloc_base< _Tp >.

Definition at line 621 of file mt_allocator.h.

template<typename _Tp, typename _Poolp = __common_pool_policy<__pool, __thread_default>>
typedef ptrdiff_t __gnu_cxx::__mt_alloc< _Tp, _Poolp >::difference_type

Reimplemented from __gnu_cxx::__mt_alloc_base< _Tp >.

Definition at line 617 of file mt_allocator.h.

template<typename _Tp, typename _Poolp = __common_pool_policy<__pool, __thread_default>>
typedef _Tp* __gnu_cxx::__mt_alloc< _Tp, _Poolp >::pointer

Reimplemented from __gnu_cxx::__mt_alloc_base< _Tp >.

Definition at line 618 of file mt_allocator.h.

template<typename _Tp, typename _Poolp = __common_pool_policy<__pool, __thread_default>>
typedef _Tp& __gnu_cxx::__mt_alloc< _Tp, _Poolp >::reference

Reimplemented from __gnu_cxx::__mt_alloc_base< _Tp >.

Definition at line 620 of file mt_allocator.h.

template<typename _Tp, typename _Poolp = __common_pool_policy<__pool, __thread_default>>
typedef size_t __gnu_cxx::__mt_alloc< _Tp, _Poolp >::size_type

Reimplemented from __gnu_cxx::__mt_alloc_base< _Tp >.

Definition at line 616 of file mt_allocator.h.

template<typename _Tp, typename _Poolp = __common_pool_policy<__pool, __thread_default>>
typedef _Tp __gnu_cxx::__mt_alloc< _Tp, _Poolp >::value_type

Reimplemented from __gnu_cxx::__mt_alloc_base< _Tp >.

Definition at line 622 of file mt_allocator.h.


Constructor & Destructor Documentation

template<typename _Tp, typename _Poolp = __common_pool_policy<__pool, __thread_default>>
__gnu_cxx::__mt_alloc< _Tp, _Poolp >::__mt_alloc (  )  throw () [inline]

Definition at line 633 of file mt_allocator.h.

template<typename _Tp, typename _Poolp = __common_pool_policy<__pool, __thread_default>>
__gnu_cxx::__mt_alloc< _Tp, _Poolp >::__mt_alloc ( const __mt_alloc< _Tp, _Poolp > &   )  throw () [inline]

Definition at line 635 of file mt_allocator.h.

template<typename _Tp, typename _Poolp = __common_pool_policy<__pool, __thread_default>>
template<typename _Tp1, typename _Poolp1>
__gnu_cxx::__mt_alloc< _Tp, _Poolp >::__mt_alloc ( const __mt_alloc< _Tp1, _Poolp1 > &   )  throw () [inline]

Definition at line 638 of file mt_allocator.h.

template<typename _Tp, typename _Poolp = __common_pool_policy<__pool, __thread_default>>
__gnu_cxx::__mt_alloc< _Tp, _Poolp >::~__mt_alloc (  )  throw () [inline]

Definition at line 640 of file mt_allocator.h.


Member Function Documentation

template<typename _Tp, typename _Poolp = __common_pool_policy<__pool, __thread_default>>
const __pool_base::_Tune __gnu_cxx::__mt_alloc< _Tp, _Poolp >::_M_get_options (  )  [inline]

Definition at line 649 of file mt_allocator.h.

template<typename _Tp, typename _Poolp = __common_pool_policy<__pool, __thread_default>>
void __gnu_cxx::__mt_alloc< _Tp, _Poolp >::_M_set_options ( __pool_base::_Tune  __t  )  [inline]

Definition at line 656 of file mt_allocator.h.

template<typename _Tp, typename _Poolp>
__mt_alloc< _Tp, _Poolp >::pointer __gnu_cxx::__mt_alloc< _Tp, _Poolp >::allocate ( size_type  __n,
const void *  = 0 
)

Definition at line 663 of file mt_allocator.h.

References std::__throw_bad_alloc().

template<typename _Tp, typename _Poolp>
void __gnu_cxx::__mt_alloc< _Tp, _Poolp >::deallocate ( pointer  __p,
size_type  __n 
)

Definition at line 710 of file mt_allocator.h.


The documentation for this class was generated from the following file:
Generated on Tue Feb 2 16:58:02 2010 for GNU C++ STL by  doxygen 1.4.7