26#ifndef _STLP_PTHREAD_ALLOC_H
27#define _STLP_PTHREAD_ALLOC_H
44#if !defined (_STLP_PTHREADS)
45# error POSIX specific allocator implementation. Your system do not seems to \
46have this interface so please comment the _STLP_USE_PERTHREAD_ALLOC macro \
47or report to the STLport forum.
50#if defined (_STLP_USE_NO_IOSTREAMS)
51# error You cannot use per thread allocator implementation without building \
55#ifndef _STLP_INTERNAL_ALLOC_H
63struct _Pthread_alloc_per_thread_state;
108#ifdef _STLP_MEMBER_TEMPLATE_CLASSES
109 template <
class _NewType>
struct rebind {
117#if defined (_STLP_MEMBER_TEMPLATES)
136#if defined (_STLP_DEBUG_UNINITIALIZED) && !defined (_STLP_DEBUG_ALLOC)
148#if defined (_STLP_DEBUG_UNINITIALIZED) && !defined (_STLP_DEBUG_ALLOC)
156 {
return size_t(-1) /
sizeof(_Tp); }
161#if defined (_STLP_NO_EXTENSIONS)
175#if defined (_STLP_DEBUG_UNINITIALIZED) && !defined (_STLP_DEBUG_ALLOC)
178 __allocated_n = __buf_size /
sizeof(
value_type);
184#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
197#ifdef _STLP_MEMBER_TEMPLATE_CLASSES
198 template <
class _NewType>
struct rebind {
204template <
class _T1,
class _T2>
209#ifdef _STLP_FUNCTION_TMPL_PARTIAL_ORDER
210template <
class _T1,
class _T2>
217#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
219template <
class _Tp,
class _Atype>
225#if defined (_STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE)
227template <
class _Tp1,
class _Tp2>
232template <
class _Tp1,
class _Tp2>
255#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
261# if defined (_STLP_HAS_WCHAR_T)
265# if defined (_STLP_USE_PTR_SPECIALIZATIONS)
289#ifdef _STLP_MEMBER_TEMPLATE_CLASSES
290 template <
class _NewType>
struct rebind {
296 _M_state = _S_Alloc::_S_get_per_thread_state();
300#if defined (_STLP_MEMBER_TEMPLATES)
319#if defined (_STLP_DEBUG_UNINITIALIZED) && !defined (_STLP_DEBUG_ALLOC)
331#if defined (_STLP_DEBUG_UNINITIALIZED) && !defined (_STLP_DEBUG_ALLOC)
339 {
return size_t(-1) /
sizeof(_Tp); }
347#if defined (_STLP_NO_EXTENSIONS)
361#if defined (_STLP_DEBUG_UNINITIALIZED) && !defined (_STLP_DEBUG_ALLOC)
364 __allocated_n = __buf_size /
sizeof(
value_type);
380#ifdef _STLP_MEMBER_TEMPLATE_CLASSES
381 template <
class _NewType>
struct rebind {
387template <
class _T1,
class _T2>
392#ifdef _STLP_FUNCTION_TMPL_PARTIAL_ORDER
393template <
class _T1,
class _T2>
400#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
402template <
class _Tp,
class _Atype>
408#if defined (_STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE)
410template <
class _Tp1,
class _Tp2>
415template <
class _Tp1,
class _Tp2>
438#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
444# if defined (_STLP_HAS_WCHAR_T)
448# if defined (_STLP_USE_PTR_SPECIALIZATIONS)
_STLP_INLINE_LOOP _InputIter const _Tp & __val
allocator< _Tp2 > &_STLP_CALL __stl_alloc_rebind(allocator< _Tp1 > &__a, const _Tp2 *)
bool _STLP_CALL operator!=(const allocator< _T1 > &, const allocator< _T2 > &) _STLP_NOTHROW
allocator< _Tp2 > _STLP_CALL __stl_alloc_create(const allocator< _Tp1 > &, const _Tp2 *)
#define _STLP_ASSERT(expr)
#define _STLP_THROW_BAD_ALLOC
__pthread_alloc pthread_alloc
bool operator==(const pthread_allocator< _T1 > &, const pthread_allocator< _T2 > &a2)
_STLP_MOVE_TO_STD_NAMESPACE typedef _STLP_PRIV _Pthread_alloc __pthread_alloc
static void *_STLP_CALL reallocate(void *__p, size_t __old_sz, size_t &__new_sz)
static __state_type *_STLP_CALL _S_get_per_thread_state()
static void _STLP_CALL deallocate(void *__p, size_t __n)
static void _STLP_CALL deallocate(void *__p, size_t __n, __state_type *__a)
_Pthread_alloc_per_thread_state __state_type
static void *_STLP_CALL allocate(size_t &__n, __state_type *__a)
static void *_STLP_CALL allocate(size_t &__n)
ptrdiff_t difference_type
const void * const_pointer
per_thread_allocator(const per_thread_allocator< _Tp > &__a) _STLP_NOTHROW
_Tp * allocate(size_type __n, const void *=0)
size_type max_size() const _STLP_NOTHROW
const _Tp & const_reference
ptrdiff_t difference_type
pointer address(reference __x) const
~per_thread_allocator() _STLP_NOTHROW
void construct(pointer __p, const _Tp &__val)
const_pointer address(const_reference __x) const
const _Tp * const_pointer
per_thread_allocator() _STLP_NOTHROW
_Tp * allocate(size_type __n, size_type &__allocated_n)
pthread_alloc::__state_type __state_type
void deallocate(pointer __p, size_type __n)
ptrdiff_t difference_type
const void * const_pointer
const _Tp * const_pointer
void construct(pointer __p, const _Tp &__val)
_Tp * allocate(size_type __n, const void *=0)
void deallocate(pointer __p, size_type __n)
const _Tp & const_reference
const_pointer address(const_reference __x) const
pthread_allocator() _STLP_NOTHROW
~pthread_allocator() _STLP_NOTHROW
_Tp * allocate(size_type __n, size_type &__allocated_n)
pointer address(reference __x) const
pthread_allocator(const pthread_allocator< _Tp > &a) _STLP_NOTHROW
ptrdiff_t difference_type
size_type max_size() const _STLP_NOTHROW
__kernel_ptrdiff_t ptrdiff_t
#define _STLP_TEMPLATE_NULL
#define __REINTERPRET_CAST(__x, __y)
#define _STLP_MOVE_TO_STD_NAMESPACE
#define _STLP_CLASS_DECLSPEC
#define _STLP_BEGIN_NAMESPACE
#define _STLP_END_NAMESPACE
#define _STLP_MOVE_TO_PRIV_NAMESPACE
GLboolean GLboolean GLboolean GLboolean a
static const struct update_accum a2
_Rebind_type::other allocator_type
_STLportAlloc has_trivial_destructor
_IsSTLportClass< per_thread_allocator< _Tp > >::_Ret _STLportAlloc
_STLportAlloc has_trivial_assignment_operator
_STLportAlloc has_trivial_copy_constructor
__false_type has_trivial_default_constructor
_STLportAlloc has_trivial_default_constructor
_STLportAlloc has_trivial_copy_constructor
_STLportAlloc has_trivial_assignment_operator
_IsSTLportClass< pthread_allocator< _Tp > >::_Ret _STLportAlloc
_STLportAlloc is_POD_type
_STLportAlloc has_trivial_destructor