FST  openfst-1.7.2
OpenFst Library
Classes | Public Types | Public Member Functions | List of all members
fst::BlockAllocator< T > Class Template Reference

#include <memory.h>

Classes

struct  rebind
 

Public Types

using Allocator = std::allocator< T >
 
using size_type = typename Allocator::size_type
 
using difference_type = typename Allocator::difference_type
 
using pointer = typename Allocator::pointer
 
using const_pointer = typename Allocator::const_pointer
 
using reference = typename Allocator::reference
 
using const_reference = typename Allocator::const_reference
 
using value_type = typename Allocator::value_type
 

Public Member Functions

 BlockAllocator (size_t block_size=kAllocSize)
 
 BlockAllocator (const BlockAllocator< T > &arena_alloc)
 
template<typename U >
 BlockAllocator (const BlockAllocator< U > &arena_alloc)
 
 ~BlockAllocator ()
 
pointer address (reference ref) const
 
const_pointer address (const_reference ref) const
 
size_type max_size () const
 
template<class U , class... Args>
void construct (U *p, Args &&...args)
 
void destroy (pointer p)
 
pointer allocate (size_type n, const void *hint=nullptr)
 
void deallocate (pointer p, size_type n)
 
MemoryArenaCollectionArenas () const
 

Detailed Description

template<typename T>
class fst::BlockAllocator< T >

Definition at line 230 of file memory.h.

Member Typedef Documentation

template<typename T>
using fst::BlockAllocator< T >::Allocator = std::allocator<T>

Definition at line 232 of file memory.h.

template<typename T>
using fst::BlockAllocator< T >::const_pointer = typename Allocator::const_pointer

Definition at line 236 of file memory.h.

template<typename T>
using fst::BlockAllocator< T >::const_reference = typename Allocator::const_reference

Definition at line 238 of file memory.h.

template<typename T>
using fst::BlockAllocator< T >::difference_type = typename Allocator::difference_type

Definition at line 234 of file memory.h.

template<typename T>
using fst::BlockAllocator< T >::pointer = typename Allocator::pointer

Definition at line 235 of file memory.h.

template<typename T>
using fst::BlockAllocator< T >::reference = typename Allocator::reference

Definition at line 237 of file memory.h.

template<typename T>
using fst::BlockAllocator< T >::size_type = typename Allocator::size_type

Definition at line 233 of file memory.h.

template<typename T>
using fst::BlockAllocator< T >::value_type = typename Allocator::value_type

Definition at line 239 of file memory.h.

Constructor & Destructor Documentation

template<typename T>
fst::BlockAllocator< T >::BlockAllocator ( size_t  block_size = kAllocSize)
inlineexplicit

Definition at line 246 of file memory.h.

template<typename T>
fst::BlockAllocator< T >::BlockAllocator ( const BlockAllocator< T > &  arena_alloc)
inline

Definition at line 249 of file memory.h.

template<typename T>
template<typename U >
fst::BlockAllocator< T >::BlockAllocator ( const BlockAllocator< U > &  arena_alloc)
inlineexplicit

Definition at line 255 of file memory.h.

template<typename T>
fst::BlockAllocator< T >::~BlockAllocator ( )
inline

Definition at line 260 of file memory.h.

Member Function Documentation

template<typename T>
pointer fst::BlockAllocator< T >::address ( reference  ref) const
inline

Definition at line 264 of file memory.h.

template<typename T>
const_pointer fst::BlockAllocator< T >::address ( const_reference  ref) const
inline

Definition at line 266 of file memory.h.

template<typename T>
pointer fst::BlockAllocator< T >::allocate ( size_type  n,
const void *  hint = nullptr 
)
inline

Definition at line 279 of file memory.h.

template<typename T>
MemoryArenaCollection* fst::BlockAllocator< T >::Arenas ( ) const
inline

Definition at line 291 of file memory.h.

template<typename T>
template<class U , class... Args>
void fst::BlockAllocator< T >::construct ( U *  p,
Args &&...  args 
)
inline

Definition at line 273 of file memory.h.

template<typename T>
void fst::BlockAllocator< T >::deallocate ( pointer  p,
size_type  n 
)
inline

Definition at line 287 of file memory.h.

template<typename T>
void fst::BlockAllocator< T >::destroy ( pointer  p)
inline

Definition at line 277 of file memory.h.

template<typename T>
size_type fst::BlockAllocator< T >::max_size ( ) const
inline

Definition at line 270 of file memory.h.


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