27#ifndef _STLP_INTERNAL_ALLOC_H
28#define _STLP_INTERNAL_ALLOC_H
30#ifndef _STLP_INTERNAL_CSTDDEF
34#ifndef _STLP_INTERNAL_CSTDLIB
38#ifndef _STLP_INTERNAL_CSTRING
42#ifndef _STLP_INTERNAL_ALGOBASE_H
46#ifndef _STLP_INTERNAL_NEW_HEADER
50#ifndef _STLP_INTERNAL_CONSTRUCT_H
59#if !defined (_STLP_USE_NO_IOSTREAMS)
68#if !defined (_STLP_USE_NO_IOSTREAMS)
81#if !defined (_STLP_USE_NO_IOSTREAMS)
103template <
class _Alloc>
134 static void _STLP_CALL deallocate(
void *,
size_t);
137# if defined (__OS400__)
144#if !defined (_STLP_USE_NO_IOSTREAMS)
164# if defined (_STLP_USE_TEMPLATE_EXPORT)
170#if defined (_STLP_USE_TEMPLATE_EXPORT)
177#if defined (_STLP_MEMBER_TEMPLATES) || ! defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
180# if defined (_STLP_MEMBER_TEMPLATE_CLASSES) && defined (_STLP_NO_TEMPLATE_CONVERSIONS)
181# define _STLP_CONVERT_ALLOCATOR(__a, _Tp) __stl_alloc_create(__a,(_Tp*)0)
183# define _STLP_CONVERT_ALLOCATOR(__a, _Tp) __a
188# define _STLP_CONVERT_ALLOCATOR(__a, _Tp) __stl_alloc_create(__a,(_Tp*)0)
196template <
class _Tp,
class _Allocator>
199#if !defined (_STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE)
211#if defined (_STLP_USE_PERTHREAD_ALLOC)
219#elif defined (_STLP_USE_NEWALLOC)
221#elif defined (_STLP_USE_MALLOC)
227#if defined (_STLP_DEBUG_ALLOC)
233#if !defined (_STLP_NO_ANACHRONISMS)
284#if defined (_STLP_MEMBER_TEMPLATE_CLASSES)
285 template <
class _Tp1>
struct rebind {
290#if defined (_STLP_MEMBER_TEMPLATES)
294#if !defined (_STLP_NO_MOVE_SEMANTIC)
308#if defined (_STLP_DEBUG_UNINITIALIZED) && !defined (_STLP_DEBUG_ALLOC)
320#if defined (_STLP_DEBUG_UNINITIALIZED) && !defined (_STLP_DEBUG_ALLOC)
326#if !defined (_STLP_NO_ANACHRONISMS)
334#if defined (_STLP_NO_EXTENSIONS)
349#if defined (_STLP_DEBUG_UNINITIALIZED) && !defined (_STLP_DEBUG_ALLOC)
352 __allocated_n = __buf_size /
sizeof(
value_type);
358#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
370#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
371 typedef void value_type;
373#if defined (_STLP_MEMBER_TEMPLATE_CLASSES)
374 template <
class _Tp1>
struct rebind {
380template <
class _T1,
class _T2>
383template <
class _T1,
class _T2>
387#if defined (_STLP_USE_TEMPLATE_EXPORT)
389# if defined (_STLP_HAS_WCHAR_T)
392# if defined (_STLP_USE_PTR_SPECIALIZATIONS)
401#if !defined (__BORLANDC__)
418#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
424# if defined (_STLP_HAS_WCHAR_T)
428# if defined (_STLP_USE_PTR_SPECIALIZATIONS)
435#if !defined (_STLP_FORCE_ALLOCATORS)
436# define _STLP_FORCE_ALLOCATORS(a,y)
439#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) && !defined (_STLP_MEMBER_TEMPLATE_CLASSES)
441template <
class _Tp,
class _Tp1>
450#if !defined (_STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE) && defined (_STLP_MEMBER_TEMPLATES)
451template <
class _Tp,
class _Alloc>
454 typedef typename _Alloc::_STLP_TEMPLATE rebind<_Tp>::other _Rebound_type;
455 return _Rebound_type(__a);
460template <
class _Tp1,
class _Tp2>
463template <
class _Tp1,
class _Tp2>
471template <
class _Value,
class _Tp,
class _MaybeReboundAlloc>
481 _MaybeReboundAlloc(__a), _M_data(__p) {}
483#if !defined (_STLP_NO_MOVE_SEMANTIC)
501 _MaybeReboundAlloc &__base_this = *
this;
502 _MaybeReboundAlloc &__base_x = __x;
503 _STLP_STD::swap(__base_this, __base_x);
508#if !defined (__BORLANDC__)
522 _STLP_STD::swap(_M_data, __x.
_M_data);
526#if !defined (__BORLANDC__)
531 return allocate(
__n, __allocated_n, _STLportAlloc());
536#if defined (_STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE)
538 _Tp* allocate(size_type
__n)
540 void deallocate(_Tp* __p, size_type
__n)
548 {
return _Base::allocate(
__n); }
551 {
return _Base::_M_allocate(
__n, __allocated_n); }
558#if defined (_STLP_USE_TEMPLATE_EXPORT)
560# if defined (_STLP_HAS_WCHAR_T)
563# if defined (_STLP_USE_PTR_SPECIALIZATIONS)
571#if defined (_STLP_EXPOSE_GLOBALS_IMPLEMENTATION) && !defined (_STLP_LINK_TIME_INSTANTIATION)
_STLP_INLINE_LOOP _InputIter const _Tp & __val
#define _STLP_CONVERT_ALLOCATOR(__a, _Tp)
__sgi_alloc __single_client_alloc
__node_alloc __alloc_type
allocator< _Tp2 > &_STLP_CALL __stl_alloc_rebind(allocator< _Tp1 > &__a, const _Tp2 *)
__sgi_alloc __multithreaded_alloc
_STLP_BEGIN_NAMESPACE typedef void(* __oom_handler_type)()
bool _STLP_CALL operator!=(const allocator< _T1 > &, const allocator< _T2 > &) _STLP_NOTHROW
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)
_STLP_TYPENAME_ON_RETURN_TYPE _MoveSourceTraits< _Tp >::_Type _AsMoveSource(_Tp &src)
void _STLP_CALL __stl_delete(void *__p)
#define _STLP_THROW_BAD_ALLOC
_STLP_BEGIN_NAMESPACE void *_STLP_CALL __stl_new(size_t __n)
_STLP_MOVE_TO_STD_NAMESPACE typedef _STLP_PRIV _Pthread_alloc __pthread_alloc
void get(int argc, const char *argv[])
void _M_swap_alloc(_Self &, const __true_type &)
_STLP_alloc_proxy(__move_source< _Self > src)
_Base::size_type size_type
_STLP_alloc_proxy< _Value, _Tp, _MaybeReboundAlloc > _Self
_Tp * allocate(size_type __n)
_Tp * allocate(size_type __n, size_type &__allocated_n, const __true_type &)
void _M_swap_alloc(_Self &__x, const __false_type &)
_Tp * allocate(size_type __n, size_type &__allocated_n, const __false_type &)
_Tp * allocate(size_type __n, size_type &__allocated_n)
_STLP_alloc_proxy(const _MaybeReboundAlloc &__a, _Value __p)
void _M_swap_alloc(_Self &__x)
static size_t _STLP_CALL __extra_after_chunk()
_Alloc::value_type value_type
static size_t _STLP_CALL __extra_before_chunk()
static void _STLP_CALL deallocate(void *__p, size_t)
static void *_STLP_CALL allocate(size_t __n)
static void _STLP_CALL deallocate(void *__p, size_t)
static void _STLP_CALL deallocate(void *__p, size_t __n)
static void *_STLP_CALL allocate(size_t &__n)
const void * const_pointer
ptrdiff_t difference_type
void deallocate(pointer __p, size_type __n)
const_pointer address(const_reference __x) const
allocator() _STLP_NOTHROW
void deallocate(pointer __p) const
size_type max_size() const _STLP_NOTHROW
_Tp * _M_allocate(size_type __n, size_type &__allocated_n)
ptrdiff_t difference_type
void destroy(pointer __p)
const _Tp & const_reference
void construct(pointer __p, const_reference __val)
allocator(const allocator< _Tp > &) _STLP_NOTHROW
allocator(__move_source< allocator< _Tp > > src) _STLP_NOTHROW
pointer address(reference __x) const
const _Tp * const_pointer
~allocator() _STLP_NOTHROW
_Tp * allocate(size_type __n, const void *=0)
__kernel_ptrdiff_t ptrdiff_t
#define _STLP_TEMPLATE_NULL
#define __REINTERPRET_CAST(__x, __y)
#define _STLP_TYPENAME_ON_RETURN_TYPE
#define _STLP_MOVE_TO_STD_NAMESPACE
#define __STATIC_CAST(__x, __y)
#define _STLP_CLASS_DECLSPEC
#define _STLP_EXPORT_TEMPLATE_CLASS
#define _STLP_BEGIN_NAMESPACE
#define _STLP_END_NAMESPACE
#define _STLP_MOVE_TO_PRIV_NAMESPACE
_Rebind_type::other allocator_type
_Allocator::_STLP_TEMPLATE rebind< _Tp > _Rebind_type
static allocator_type create_allocator(const _Orig &__a)
_IsSTLportClass< allocator< _Tp > >::_Ret _STLportAlloc
_STLportAlloc has_trivial_default_constructor
_STLportAlloc has_trivial_assignment_operator
_STLportAlloc is_POD_type
_STLportAlloc has_trivial_destructor
_STLportAlloc has_trivial_copy_constructor