OpenDDS::DCPS::BasicQueueLinkAllocator< T > Class Template Reference

#include <BasicQueueLinkAllocator_T.h>

Collaboration diagram for OpenDDS::DCPS::BasicQueueLinkAllocator< T >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 BasicQueueLinkAllocator (unsigned chunk_size, unsigned initial_chunks)
 Constructor.
virtual ~BasicQueueLinkAllocator ()
 Virtual Destructor.
void * malloc (size_t nbytes=sizeof(LinkType))
 malloc implementation.
virtual void * calloc (size_t nbytes=sizeof(LinkType), char initial_value= '\0')
 calloc implementation.
virtual void * calloc (size_t n_elem, size_t elem_size, char initial_value= '\0')
 This interface not supported.
void free (void *ptr)
 free implementation.

Private Types

typedef BasicQueueLink< T > LinkType
typedef BasicQueueLinkChunk<
T > 
ChunkType
typedef ACE_Cached_Mem_Pool_Node<
LinkType
NodeType
typedef ACE_Locked_Free_List<
NodeType, ACE_Null_Mutex > 
FreeListType

Private Member Functions

void grow ()
 Grow by another chunk.

Private Attributes

size_t chunk_size_
 Number of links to allocate for each chunk.
ChunkTypehead_chunk_
 The first chunk.
ChunkTypetail_chunk_
 The last chunk.
FreeListType free_list_
 Maintain a cached memory free list.

template<typename T>
class OpenDDS::DCPS::BasicQueueLinkAllocator< T >


Member Typedef Documentation

template<typename T>
typedef BasicQueueLinkChunk<T> OpenDDS::DCPS::BasicQueueLinkAllocator< T >::ChunkType [private]

template<typename T>
typedef ACE_Locked_Free_List<NodeType, ACE_Null_Mutex> OpenDDS::DCPS::BasicQueueLinkAllocator< T >::FreeListType [private]

template<typename T>
typedef BasicQueueLink<T> OpenDDS::DCPS::BasicQueueLinkAllocator< T >::LinkType [private]

template<typename T>
typedef ACE_Cached_Mem_Pool_Node<LinkType > OpenDDS::DCPS::BasicQueueLinkAllocator< T >::NodeType [private]


Constructor & Destructor Documentation

template<typename T>
OpenDDS::DCPS::BasicQueueLinkAllocator< T >::BasicQueueLinkAllocator ( unsigned  chunk_size,
unsigned  initial_chunks 
) [inline]

Constructor.

template<typename T>
virtual OpenDDS::DCPS::BasicQueueLinkAllocator< T >::~BasicQueueLinkAllocator (  )  [inline, virtual]

Virtual Destructor.


Member Function Documentation

template<typename T>
virtual void* OpenDDS::DCPS::BasicQueueLinkAllocator< T >::calloc ( size_t  n_elem,
size_t  elem_size,
char  initial_value = '\0' 
) [inline, virtual]

This interface not supported.

template<typename T>
virtual void* OpenDDS::DCPS::BasicQueueLinkAllocator< T >::calloc ( size_t  nbytes = sizeof(LinkType),
char  initial_value = '\0' 
) [inline, virtual]

calloc implementation.

template<typename T>
void OpenDDS::DCPS::BasicQueueLinkAllocator< T >::free ( void *  ptr  )  [inline]

free implementation.

template<typename T>
void OpenDDS::DCPS::BasicQueueLinkAllocator< T >::grow (  )  [inline, private]

Grow by another chunk.

template<typename T>
void* OpenDDS::DCPS::BasicQueueLinkAllocator< T >::malloc ( size_t  nbytes = sizeof(LinkType)  )  [inline]

malloc implementation.


Member Data Documentation

template<typename T>
size_t OpenDDS::DCPS::BasicQueueLinkAllocator< T >::chunk_size_ [private]

Number of links to allocate for each chunk.

template<typename T>
FreeListType OpenDDS::DCPS::BasicQueueLinkAllocator< T >::free_list_ [private]

Maintain a cached memory free list.

template<typename T>
ChunkType* OpenDDS::DCPS::BasicQueueLinkAllocator< T >::head_chunk_ [private]

The first chunk.

template<typename T>
ChunkType* OpenDDS::DCPS::BasicQueueLinkAllocator< T >::tail_chunk_ [private]

The last chunk.


The documentation for this class was generated from the following file:
Generated on Fri Nov 7 09:37:40 2008 for OpenDDS by  doxygen 1.4.7