OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SysAllocator< T > Class Template Reference

#include <ArenaAllocator.h>

Public Types

using Self = SysAllocator
 
using value_type = T
 

Public Member Functions

constexpr SysAllocator ()=default
 
constexpr SysAllocator (SysAllocator const &)=default
 
template<class U >
constexpr SysAllocator (const SysAllocator< U > &) noexcept
 
T * allocate (size_t count)
 
void deallocate (T *p, size_t)
 

Friends

bool operator== (Self const &, Self const &) noexcept
 
bool operator!= (Self const &, Self const &) noexcept
 

Detailed Description

template<class T>
class SysAllocator< T >

Definition at line 23 of file ArenaAllocator.h.

Member Typedef Documentation

template<class T>
using SysAllocator< T >::Self = SysAllocator

Definition at line 25 of file ArenaAllocator.h.

template<class T>
using SysAllocator< T >::value_type = T

Definition at line 26 of file ArenaAllocator.h.

Constructor & Destructor Documentation

template<class T>
constexpr SysAllocator< T >::SysAllocator ( )
default
template<class T>
constexpr SysAllocator< T >::SysAllocator ( SysAllocator< T > const &  )
default
template<class T>
template<class U >
constexpr SysAllocator< T >::SysAllocator ( const SysAllocator< U > &  )
inlinenoexcept

Definition at line 33 of file ArenaAllocator.h.

33 {}

Member Function Documentation

template<class T>
T* SysAllocator< T >::allocate ( size_t  count)
inline

Definition at line 35 of file ArenaAllocator.h.

Referenced by DramArena::allocate().

35  {
36  return reinterpret_cast<T*>(checked_malloc(count));
37  }
void * checked_malloc(const size_t size)
Definition: checked_alloc.h:45

+ Here is the caller graph for this function:

template<class T>
void SysAllocator< T >::deallocate ( T *  p,
size_t   
)
inline

Definition at line 39 of file ArenaAllocator.h.

Referenced by DramArena::~DramArena().

39 { free(p); }

+ Here is the caller graph for this function:

Friends And Related Function Documentation

template<class T>
bool operator!= ( Self const &  ,
Self const &   
)
friend

Definition at line 42 of file ArenaAllocator.h.

42 { return false; }
template<class T>
bool operator== ( Self const &  ,
Self const &   
)
friend

Definition at line 41 of file ArenaAllocator.h.

41 { return true; }

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