C++ Device API Reference Manual
Reference documentation for the Simics C++ Device API.
 
Loading...
Searching...
No Matches
simics::MallocAllocator< T, Allocator > Class Template Reference

#include <malloc_allocator.h>

Classes

struct  rebind
 

Public Types

typedef T * pointer
 
typedef const T * const_pointer
 
typedef T & reference
 
typedef const T & const_reference
 
typedef T value_type
 
typedef size_t size_type
 
typedef ptrdiff_t difference_type
 

Public Member Functions

virtual T * allocate (const size_t num_elements) const
 
T * allocate (const size_t num_elements, std::allocator_traits< std::allocator< void > > ::const_pointer hint) const
 
void deallocate (T *const addr, const size_t n) const
 
void construct (T *const uninitialized, const T &val) const
 
void destroy (T *const p) const
 
size_t max_size () const
 
T * address (T &x) const
 
const T * address (const T &x) const
 
bool operator== (const MallocAllocator &other) const
 
bool operator!= (const MallocAllocator &other) const
 
 MallocAllocator ()
 
 MallocAllocator (const MallocAllocator &)
 
 ~MallocAllocator ()
 
template<typename U >
 MallocAllocator (const MallocAllocator< U, Allocator > &)
 
MallocAllocatoroperator= (const MallocAllocator &other) const
 

Member Typedef Documentation

◆ const_pointer

template<class T , template< class > class Allocator = MmAllocator>
typedef const T* simics::MallocAllocator< T, Allocator >::const_pointer

◆ const_reference

template<class T , template< class > class Allocator = MmAllocator>
typedef const T& simics::MallocAllocator< T, Allocator >::const_reference

◆ difference_type

template<class T , template< class > class Allocator = MmAllocator>
typedef ptrdiff_t simics::MallocAllocator< T, Allocator >::difference_type

◆ pointer

template<class T , template< class > class Allocator = MmAllocator>
typedef T* simics::MallocAllocator< T, Allocator >::pointer

◆ reference

template<class T , template< class > class Allocator = MmAllocator>
typedef T& simics::MallocAllocator< T, Allocator >::reference

◆ size_type

template<class T , template< class > class Allocator = MmAllocator>
typedef size_t simics::MallocAllocator< T, Allocator >::size_type

◆ value_type

template<class T , template< class > class Allocator = MmAllocator>
typedef T simics::MallocAllocator< T, Allocator >::value_type

Constructor & Destructor Documentation

◆ MallocAllocator() [1/3]

template<class T , template< class > class Allocator = MmAllocator>
simics::MallocAllocator< T, Allocator >::MallocAllocator ( )
inline

◆ MallocAllocator() [2/3]

template<class T , template< class > class Allocator = MmAllocator>
simics::MallocAllocator< T, Allocator >::MallocAllocator ( const MallocAllocator< T, Allocator > &  )
inline

◆ ~MallocAllocator()

template<class T , template< class > class Allocator = MmAllocator>
simics::MallocAllocator< T, Allocator >::~MallocAllocator ( )
inline

◆ MallocAllocator() [3/3]

template<class T , template< class > class Allocator = MmAllocator>
template<typename U >
simics::MallocAllocator< T, Allocator >::MallocAllocator ( const MallocAllocator< U, Allocator > &  )
inline

Member Function Documentation

◆ address() [1/2]

template<class T , template< class > class Allocator = MmAllocator>
const T * simics::MallocAllocator< T, Allocator >::address ( const T &  x) const
inline

◆ address() [2/2]

template<class T , template< class > class Allocator = MmAllocator>
T * simics::MallocAllocator< T, Allocator >::address ( T &  x) const
inline

◆ allocate() [1/2]

template<class T , template< class > class Allocator = MmAllocator>
virtual T * simics::MallocAllocator< T, Allocator >::allocate ( const size_t  num_elements) const
inlinevirtual

◆ allocate() [2/2]

template<class T , template< class > class Allocator = MmAllocator>
T * simics::MallocAllocator< T, Allocator >::allocate ( const size_t  num_elements,
std::allocator_traits< std::allocator< void > > ::const_pointer  hint 
) const
inline

◆ construct()

template<class T , template< class > class Allocator = MmAllocator>
void simics::MallocAllocator< T, Allocator >::construct ( T *const  uninitialized,
const T &  val 
) const
inline

◆ deallocate()

template<class T , template< class > class Allocator = MmAllocator>
void simics::MallocAllocator< T, Allocator >::deallocate ( T *const  addr,
const size_t  n 
) const
inline

◆ destroy()

template<class T , template< class > class Allocator = MmAllocator>
void simics::MallocAllocator< T, Allocator >::destroy ( T *const  p) const
inline

◆ max_size()

template<class T , template< class > class Allocator = MmAllocator>
size_t simics::MallocAllocator< T, Allocator >::max_size ( ) const
inline

◆ operator!=()

template<class T , template< class > class Allocator = MmAllocator>
bool simics::MallocAllocator< T, Allocator >::operator!= ( const MallocAllocator< T, Allocator > &  other) const
inline

◆ operator=()

template<class T , template< class > class Allocator = MmAllocator>
MallocAllocator & simics::MallocAllocator< T, Allocator >::operator= ( const MallocAllocator< T, Allocator > &  other) const
inline

◆ operator==()

template<class T , template< class > class Allocator = MmAllocator>
bool simics::MallocAllocator< T, Allocator >::operator== ( const MallocAllocator< T, Allocator > &  other) const
inline

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