Memory::FixedSizeAllocator< TField > Class Template Reference

#include <FixedSizeAllocator.hpp>

Collaboration diagram for Memory::FixedSizeAllocator< TField >:
Collaboration graph
[legend]

List of all members.

Classes

struct  Chunk

Public Member Functions

 FixedSizeAllocator (const size_t size, const size_t num)
 ~FixedSizeAllocator ()
void init (const size_t size, const size_t num)
TField * alloc ()
void free (register TField *const ptr)

Protected Types

typedef std::vector< Chunk * > vChunk
typedef vChunk::iterator iChunk
typedef Chunk::BLOCKpBlock
typedef const Chunk::BLOCKcBlock

Protected Member Functions

 FixedSizeAllocator (const FixedSizeAllocator &)
void clear ()
void addChunk ()

Protected Attributes

size_t _blockSize
size_t _blockNum
pBlock _firstFree
vChunk _chunks
TField * _ptr

template<typename TField>
class Memory::FixedSizeAllocator< TField >


Member Typedef Documentation

template<typename TField >
typedef const Chunk::BLOCK* Memory::FixedSizeAllocator< TField >::cBlock [protected]
template<typename TField >
typedef vChunk::iterator Memory::FixedSizeAllocator< TField >::iChunk [protected]
template<typename TField >
typedef Chunk::BLOCK* Memory::FixedSizeAllocator< TField >::pBlock [protected]
template<typename TField >
typedef std::vector<Chunk*> Memory::FixedSizeAllocator< TField >::vChunk [protected]

Constructor & Destructor Documentation

template<typename TField >
Memory::FixedSizeAllocator< TField >::FixedSizeAllocator ( const size_t  size,
const size_t  num 
) [inline]
template<typename TField >
Memory::FixedSizeAllocator< TField >::~FixedSizeAllocator (  )  [inline]

Here is the call graph for this function:

template<typename TField >
Memory::FixedSizeAllocator< TField >::FixedSizeAllocator ( const FixedSizeAllocator< TField > &   )  [protected]

Member Function Documentation

template<typename TField >
void Memory::FixedSizeAllocator< TField >::addChunk (  )  [inline, protected]

Here is the caller graph for this function:

template<typename TField >
TField* Memory::FixedSizeAllocator< TField >::alloc (  )  [inline]

Here is the call graph for this function:

template<typename TField >
void Memory::FixedSizeAllocator< TField >::clear (  )  [inline, protected]

Here is the caller graph for this function:

template<typename TField >
void Memory::FixedSizeAllocator< TField >::free ( register TField *const   ptr  )  [inline]
template<typename TField >
void Memory::FixedSizeAllocator< TField >::init ( const size_t  size,
const size_t  num 
) [inline]

Here is the call graph for this function:


Member Data Documentation

template<typename TField >
size_t Memory::FixedSizeAllocator< TField >::_blockNum [protected]
template<typename TField >
size_t Memory::FixedSizeAllocator< TField >::_blockSize [protected]
template<typename TField >
vChunk Memory::FixedSizeAllocator< TField >::_chunks [protected]
template<typename TField >
pBlock Memory::FixedSizeAllocator< TField >::_firstFree [protected]
template<typename TField >
TField* Memory::FixedSizeAllocator< TField >::_ptr [protected]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 3 Jun 2020 for ModFEM by  doxygen 1.6.1