STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Static Private Member Functions | List of all members
stdext::allocators::sync_per_thread< _Cache > Class Template Reference

Public Member Functions

_DECLSPEC_ALLOCATOR voidallocate (size_t _Count)
 
void deallocate (void *_Ptr, size_t _Count)
 
bool equals (const sync_per_thread< _Cache > &_Other) const
 

Static Private Member Functions

static __declspec (thread) _Cache *_Mycache_ptr
 

Member Function Documentation

template<class _Cache >
static stdext::allocators::sync_per_thread< _Cache >::__declspec ( thread  )
staticprivate
template<class _Cache >
_DECLSPEC_ALLOCATOR void* stdext::allocators::sync_per_thread< _Cache >::allocate ( size_t  _Count)
inline
162  { // allocate from cache
163  if (_Mycache_ptr == 0)
164  _Mycache_ptr = new _Cache();
165  return (_Mycache_ptr != 0 ? _Mycache_ptr->allocate(_Count) : 0);
166  }
unsigned int _Count
Definition: xcomplex:668
template<class _Cache >
void stdext::allocators::sync_per_thread< _Cache >::deallocate ( void _Ptr,
size_t  _Count 
)
inline
169  { // deallocate through cache
170  if (_Mycache_ptr != 0)
171  _Mycache_ptr->deallocate(_Ptr, _Count);
172  }
unsigned int _Count
Definition: xcomplex:668
template<class _Cache >
bool stdext::allocators::sync_per_thread< _Cache >::equals ( const sync_per_thread< _Cache > &  _Other) const
inline
175  { // compare two caches for equality
176  return (_Mycache_ptr != 0
177  && _Other._Mycache_ptr != 0
178  && _Mycache_ptr->equals(*_Other._Mycache_ptr));
179  }

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