Whole document tree
    

Whole document tree

Templatestd::_Pthread_alloc_template class Reference
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

std::_Pthread_alloc_template< _Max_size > Class Template Reference

#include <pthread_allocimpl.h>

Collaboration diagram for std::_Pthread_alloc_template< _Max_size >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef _Pthread_alloc_obj __obj
enum  { _S_ALIGN = __STL_DATA_ALIGNMENT }

Static Public Methods

char * _S_chunk_alloc (size_t __size, int &__nobjs)
size_t _S_round_up (size_t __bytes)
size_t _S_freelist_index (size_t __bytes)
void * allocate (size_t __n)
void deallocate (void *__p, size_t __n)
void * reallocate (void *__p, size_t __old_sz, size_t __new_sz)

Static Private Methods

void _S_destructor (void *instance)
_Pthread_alloc_per_thread_state<
_Max_size > * 
_S_new_per_thread_state ()
_Pthread_alloc_per_thread_state<
_Max_size > * 
_S_get_per_thread_state ()

Static Private Attributes

pthread_mutex_t _S_chunk_allocator_lock = PTHREAD_MUTEX_INITIALIZER
char * _S_start_free = 0
char * _S_end_free = 0
size_t _S_heap_size = 0
_Pthread_alloc_per_thread_state<
_Max_size > * 
_S_free_per_thread_states = 0
pthread_key_t _S_key
bool _S_key_initialized = false

Friends

class _M_lock

template<size_t _Max_size = 128>
class std::_Pthread_alloc_template< _Max_size >


Member Typedef Documentation

template<size_t _Max_size = 128>
typedef _Pthread_alloc_obj std::_Pthread_alloc_template< _Max_size >::__obj
 

Definition at line 111 of file pthread_allocimpl.h.


Member Enumeration Documentation

template<size_t _Max_size = 128>
anonymous enum
 

Enumeration values:
_S_ALIGN 

Definition at line 117 of file pthread_allocimpl.h.


Member Function Documentation

template<size_t _Max_size>
char * std::_Pthread_alloc_template< _Max_size >::_S_chunk_alloc size_t    __size,
int &    __nobjs
[static]
 

Definition at line 266 of file pthread_allocimpl.h.

References std::_Pthread_alloc_per_thread_state< _Max_size >::__free_list, and allocate().

template<size_t _Max_size>
void std::_Pthread_alloc_template< _Max_size >::_S_destructor void *    instance [static, private]
 

Definition at line 210 of file pthread_allocimpl.h.

References std::_Pthread_alloc_template< _Max_size >::_S_free_per_thread_states.

Referenced by std::_Pthread_alloc_template< _Max_size >::_S_get_per_thread_state().

template<size_t _Max_size = 128>
size_t std::_Pthread_alloc_template< _Max_size >::_S_freelist_index size_t    __bytes [inline, static]
 

Definition at line 122 of file pthread_allocimpl.h.

References std::_Pthread_alloc_template< _Max_size >::_S_ALIGN.

Referenced by std::_Pthread_alloc_template< _Max_size >::allocate(), and std::_Pthread_alloc_template< _Max_size >::deallocate().

template<size_t _Max_size>
_Pthread_alloc_per_thread_state< _Max_size > * std::_Pthread_alloc_template< _Max_size >::_S_get_per_thread_state   [static, private]
 

Definition at line 236 of file pthread_allocimpl.h.

References std::__throw_bad_alloc(), std::_Pthread_alloc_template< _Max_size >::_S_destructor(), std::_Pthread_alloc_template< _Max_size >::_S_key, std::_Pthread_alloc_template< _Max_size >::_S_key_initialized, std::_Pthread_alloc_template< _Max_size >::_S_new_per_thread_state(), and abort().

Referenced by std::_Pthread_alloc_template< _Max_size >::allocate(), and std::_Pthread_alloc_template< _Max_size >::deallocate().

template<size_t _Max_size>
_Pthread_alloc_per_thread_state< _Max_size > * std::_Pthread_alloc_template< _Max_size >::_S_new_per_thread_state   [static, private]
 

Definition at line 221 of file pthread_allocimpl.h.

References std::_Pthread_alloc_template< _Max_size >::_S_free_per_thread_states.

Referenced by std::_Pthread_alloc_template< _Max_size >::_S_get_per_thread_state().

template<size_t _Max_size = 128>
size_t std::_Pthread_alloc_template< _Max_size >::_S_round_up size_t    __bytes [inline, static]
 

Definition at line 119 of file pthread_allocimpl.h.

References std::_Pthread_alloc_template< _Max_size >::_S_ALIGN.

Referenced by std::_Pthread_alloc_template< _Max_size >::allocate().

template<size_t _Max_size = 128>
void* std::_Pthread_alloc_template< _Max_size >::allocate size_t    __n [inline, static]
 

Definition at line 157 of file pthread_allocimpl.h.

References std::_Pthread_alloc_template< _Max_size >::_S_freelist_index(), std::_Pthread_alloc_template< _Max_size >::_S_get_per_thread_state(), std::_Pthread_alloc_template< _Max_size >::_S_key, std::_Pthread_alloc_template< _Max_size >::_S_key_initialized, std::_Pthread_alloc_template< _Max_size >::_S_round_up(), and allocate().

template<size_t _Max_size = 128>
void std::_Pthread_alloc_template< _Max_size >::deallocate void *    __p,
size_t    __n
[inline, static]
 

Definition at line 182 of file pthread_allocimpl.h.

References std::_Pthread_alloc_per_thread_state< _Max_size >::__free_list, std::_Pthread_alloc_template< _Max_size >::_S_freelist_index(), std::_Pthread_alloc_template< _Max_size >::_S_get_per_thread_state(), std::_Pthread_alloc_template< _Max_size >::_S_key, std::_Pthread_alloc_template< _Max_size >::_S_key_initialized, and deallocate().

template<size_t _Max_size>
void * std::_Pthread_alloc_template< _Max_size >::reallocate void *    __p,
size_t    __old_sz,
size_t    __new_sz
[static]
 

Definition at line 365 of file pthread_allocimpl.h.

References allocate(), and deallocate().


Friends And Related Function Documentation

template<size_t _Max_size = 128>
friend class _M_lock [friend]
 

Definition at line 147 of file pthread_allocimpl.h.


Member Data Documentation

template<size_t _Max_size = 128>
pthread_mutex_t std::_Pthread_alloc_template< _Max_size >::_S_chunk_allocator_lock = PTHREAD_MUTEX_INITIALIZER [static, private]
 

Definition at line 394 of file pthread_allocimpl.h.

template<size_t _Max_size = 128>
char * std::_Pthread_alloc_template< _Max_size >::_S_end_free = 0 [static, private]
 

Definition at line 402 of file pthread_allocimpl.h.

template<size_t _Max_size = 128>
_Pthread_alloc_per_thread_state< _Max_size > * std::_Pthread_alloc_template< _Max_size >::_S_free_per_thread_states = 0 [static, private]
 

Definition at line 384 of file pthread_allocimpl.h.

Referenced by std::_Pthread_alloc_template< _Max_size >::_S_destructor(), and std::_Pthread_alloc_template< _Max_size >::_S_new_per_thread_state().

template<size_t _Max_size = 128>
size_t std::_Pthread_alloc_template< _Max_size >::_S_heap_size = 0 [static, private]
 

Definition at line 406 of file pthread_allocimpl.h.

template<size_t _Max_size = 128>
pthread_key_t std::_Pthread_alloc_template< _Max_size >::_S_key [static, private]
 

Definition at line 387 of file pthread_allocimpl.h.

Referenced by std::_Pthread_alloc_template< _Max_size >::_S_get_per_thread_state(), std::_Pthread_alloc_template< _Max_size >::allocate(), and std::_Pthread_alloc_template< _Max_size >::deallocate().

template<size_t _Max_size = 128>
bool std::_Pthread_alloc_template< _Max_size >::_S_key_initialized = false [static, private]
 

Definition at line 390 of file pthread_allocimpl.h.

Referenced by std::_Pthread_alloc_template< _Max_size >::_S_get_per_thread_state(), std::_Pthread_alloc_template< _Max_size >::allocate(), and std::_Pthread_alloc_template< _Max_size >::deallocate().

template<size_t _Max_size = 128>
char * std::_Pthread_alloc_template< _Max_size >::_S_start_free = 0 [static, private]
 

Definition at line 398 of file pthread_allocimpl.h.


The documentation for this class was generated from the following file:
Generated on Mon Apr 8 03:17:23 2002 for libstdc++-v3 Source by doxygen1.2.15