FST  openfst-1.7.1
OpenFst Library
Classes | Public Types | Public Member Functions | List of all members
fst::PoolAllocator< 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

 PoolAllocator (size_t pool_size=kAllocSize)
 
 PoolAllocator (const PoolAllocator< T > &pool_alloc)
 
template<typename U >
 PoolAllocator (const PoolAllocator< U > &pool_alloc)
 
 ~PoolAllocator ()
 
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)
 
MemoryPoolCollectionPools () const
 

Detailed Description

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

Definition at line 322 of file memory.h.

Member Typedef Documentation

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

Definition at line 324 of file memory.h.

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

Definition at line 328 of file memory.h.

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

Definition at line 330 of file memory.h.

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

Definition at line 326 of file memory.h.

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

Definition at line 327 of file memory.h.

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

Definition at line 329 of file memory.h.

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

Definition at line 325 of file memory.h.

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

Definition at line 331 of file memory.h.

Constructor & Destructor Documentation

template<typename T>
fst::PoolAllocator< T >::PoolAllocator ( size_t  pool_size = kAllocSize)
inlineexplicit

Definition at line 338 of file memory.h.

template<typename T>
fst::PoolAllocator< T >::PoolAllocator ( const PoolAllocator< T > &  pool_alloc)
inline

Definition at line 341 of file memory.h.

template<typename T>
template<typename U >
fst::PoolAllocator< T >::PoolAllocator ( const PoolAllocator< U > &  pool_alloc)
inlineexplicit

Definition at line 347 of file memory.h.

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

Definition at line 352 of file memory.h.

Member Function Documentation

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

Definition at line 356 of file memory.h.

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

Definition at line 358 of file memory.h.

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

Definition at line 371 of file memory.h.

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

Definition at line 365 of file memory.h.

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

Definition at line 391 of file memory.h.

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

Definition at line 369 of file memory.h.

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

Definition at line 362 of file memory.h.

template<typename T>
MemoryPoolCollection* fst::PoolAllocator< T >::Pools ( ) const
inline

Definition at line 411 of file memory.h.


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