CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Private Attributes
edm::debugging_allocator< T > Class Template Reference

#include <debugging_allocator.h>

Classes

struct  rebind
 

Public Types

typedef T const * const_pointer
 
typedef T const & const_reference
 
typedef ptrdiff_t difference_type
 
typedef Tpointer
 
typedef Treference
 
typedef size_t size_type
 
typedef T value_type
 

Public Member Functions

const_pointer address (const_reference value) const
 
pointer address (reference value) const
 
pointer allocate (size_type num, void const *hint=0)
 
void construct (pointer p, T const &value)
 
void deallocate (pointer p, size_type num)
 
 debugging_allocator () noexcept
 
 debugging_allocator (debugging_allocator const &) noexcept
 
template<class U >
 debugging_allocator (debugging_allocator< U > const &) noexcept
 
void destroy (pointer p)
 
size_type max_size () const noexcept
 
 ~debugging_allocator () noexcept
 

Private Attributes

char dummy
 

Detailed Description

template<class T>
class edm::debugging_allocator< T >

Definition at line 25 of file debugging_allocator.h.

Member Typedef Documentation

◆ const_pointer

template<class T >
typedef T const* edm::debugging_allocator< T >::const_pointer

Definition at line 31 of file debugging_allocator.h.

◆ const_reference

template<class T >
typedef T const& edm::debugging_allocator< T >::const_reference

Definition at line 33 of file debugging_allocator.h.

◆ difference_type

template<class T >
typedef ptrdiff_t edm::debugging_allocator< T >::difference_type

Definition at line 29 of file debugging_allocator.h.

◆ pointer

template<class T >
typedef T* edm::debugging_allocator< T >::pointer

Definition at line 30 of file debugging_allocator.h.

◆ reference

template<class T >
typedef T& edm::debugging_allocator< T >::reference

Definition at line 32 of file debugging_allocator.h.

◆ size_type

template<class T >
typedef size_t edm::debugging_allocator< T >::size_type

Definition at line 28 of file debugging_allocator.h.

◆ value_type

template<class T >
typedef T edm::debugging_allocator< T >::value_type

Definition at line 34 of file debugging_allocator.h.

Constructor & Destructor Documentation

◆ debugging_allocator() [1/3]

template<class T >
edm::debugging_allocator< T >::debugging_allocator ( )
inlinenoexcept

Definition at line 39 of file debugging_allocator.h.

39 : dummy('x') { }

◆ debugging_allocator() [2/3]

template<class T >
edm::debugging_allocator< T >::debugging_allocator ( debugging_allocator< T > const &  )
inlinenoexcept

Definition at line 41 of file debugging_allocator.h.

41 : dummy('c') { }

◆ debugging_allocator() [3/3]

template<class T >
template<class U >
edm::debugging_allocator< T >::debugging_allocator ( debugging_allocator< U > const &  )
inlinenoexcept

Definition at line 43 of file debugging_allocator.h.

43 : dummy('u') { }

◆ ~debugging_allocator()

template<class T >
edm::debugging_allocator< T >::~debugging_allocator ( )
inlinenoexcept

Definition at line 45 of file debugging_allocator.h.

45 { };

Member Function Documentation

◆ address() [1/2]

template<class T >
const_pointer edm::debugging_allocator< T >::address ( const_reference  value) const
inline

Definition at line 49 of file debugging_allocator.h.

49 {return &value; }

References relativeConstraints::value.

◆ address() [2/2]

template<class T >
pointer edm::debugging_allocator< T >::address ( reference  value) const
inline

Definition at line 47 of file debugging_allocator.h.

47 {return &value;}

References relativeConstraints::value.

◆ allocate()

template<class T >
pointer edm::debugging_allocator< T >::allocate ( size_type  num,
void const *  hint = 0 
)
inline

Definition at line 53 of file debugging_allocator.h.

54  {
55  // allocate objects with global new
56  return (pointer)(::operator new(num*sizeof(T)));
57  }

References EgammaValidation_cff::num, and Utilities::operator.

◆ construct()

template<class T >
void edm::debugging_allocator< T >::construct ( pointer  p,
T const &  value 
)
inline

Definition at line 59 of file debugging_allocator.h.

59 { new((void*)p)T(value); }

References AlCaHLTBitMon_ParallelJobs::p.

◆ deallocate()

template<class T >
void edm::debugging_allocator< T >::deallocate ( pointer  p,
size_type  num 
)
inline

Definition at line 63 of file debugging_allocator.h.

63 { ::operator delete((void*)p); }

References Utilities::operator, and AlCaHLTBitMon_ParallelJobs::p.

◆ destroy()

template<class T >
void edm::debugging_allocator< T >::destroy ( pointer  p)
inline

Definition at line 61 of file debugging_allocator.h.

61 { p->~T(); }

References AlCaHLTBitMon_ParallelJobs::p.

◆ max_size()

template<class T >
size_type edm::debugging_allocator< T >::max_size ( ) const
inlinenoexcept

Definition at line 51 of file debugging_allocator.h.

51 { return std::numeric_limits<size_type>::max()/sizeof(T); }

References SiStripPI::max.

Member Data Documentation

◆ dummy

template<class T >
char edm::debugging_allocator< T >::dummy
private

Definition at line 66 of file debugging_allocator.h.

edm::debugging_allocator::dummy
char dummy
Definition: debugging_allocator.h:66
edm::debugging_allocator::pointer
T * pointer
Definition: debugging_allocator.h:30
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
Utilities.operator
operator
Definition: Utilities.py:24
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
value
Definition: value.py:1
EgammaValidation_cff.num
num
Definition: EgammaValidation_cff.py:34
T
long double T
Definition: Basic3DVectorLD.h:48
relativeConstraints.value
value
Definition: relativeConstraints.py:53