tlds
Transactional Operations for Linked Data Structures
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Allocator< DataType > Class Template Reference

#include <allocator.h>

Inheritance diagram for Allocator< DataType >:
Collaboration diagram for Allocator< DataType >:

Public Member Functions

 Allocator (uint64_t totalBytes, uint64_t threadCount, uint64_t typeSize)
 
 ~Allocator ()
 
void Init ()
 
void Uninit ()
 
DataType * Alloc ()
 

Private Attributes

char * m_pool
 
uint64_t m_totalBytes
 
uint64_t m_threadCount
 
uint64_t m_ticket
 
uint64_t m_typeSize
 

Static Private Attributes

static __thread char * m_base
 
static __thread uint64_t m_freeIndex
 

Constructor & Destructor Documentation

template<typename DataType>
Allocator< DataType >::Allocator ( uint64_t  totalBytes,
uint64_t  threadCount,
uint64_t  typeSize 
)
inline
template<typename DataType>
Allocator< DataType >::~Allocator ( )
inline

Member Function Documentation

template<typename DataType>
DataType* Allocator< DataType >::Alloc ( )
inline

Here is the caller graph for this function:

template<typename DataType>
void Allocator< DataType >::Init ( )
inline
template<typename DataType>
void Allocator< DataType >::Uninit ( )
inline

Member Data Documentation

template<typename DataType>
__thread char * Allocator< T >::m_base
staticprivate
template<typename DataType>
__thread uint64_t Allocator< T >::m_freeIndex
staticprivate
template<typename DataType>
char* Allocator< DataType >::m_pool
private
template<typename DataType>
uint64_t Allocator< DataType >::m_threadCount
private
template<typename DataType>
uint64_t Allocator< DataType >::m_ticket
private
template<typename DataType>
uint64_t Allocator< DataType >::m_totalBytes
private
template<typename DataType>
uint64_t Allocator< DataType >::m_typeSize
private

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