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

#include <memory.h>

Public Types

using Allocator = std::allocator< T >
 
using size_type = typename Allocator::size_type
 
using value_type = typename Allocator::value_type
 

Public Member Functions

 BlockAllocator (size_t block_size=kAllocSize)
 
template<typename U >
 BlockAllocator (const BlockAllocator< U > &arena_alloc)
 
T * allocate (size_type n, const void *hint=nullptr)
 
void deallocate (T *p, size_type n)
 
std::shared_ptr< MemoryArenaCollectionArenas () const
 

Detailed Description

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

Definition at line 227 of file memory.h.

Member Typedef Documentation

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

Definition at line 229 of file memory.h.

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

Definition at line 230 of file memory.h.

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

Definition at line 231 of file memory.h.

Constructor & Destructor Documentation

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

Definition at line 233 of file memory.h.

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

Definition at line 237 of file memory.h.

Member Function Documentation

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

Definition at line 240 of file memory.h.

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

Definition at line 253 of file memory.h.

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

Definition at line 249 of file memory.h.


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