Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::StaticAlloc< _Tp > Class Template Reference

Static allocator for profiling. More...

#include <arcane/std/ProfilingInfo.h>

Collaboration diagram for Arcane::StaticAlloc< _Tp >:

Classes

struct  rebind

Public Types

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

Public Member Functions

 StaticAlloc (const StaticAlloc &) ARCANE_NOEXCEPT
template<typename _Tp1>
 StaticAlloc (const StaticAlloc< _Tp1 > &) ARCANE_NOEXCEPT
void construct (pointer __p, const _Tp &__val)
void destroy (pointer __p)
pointer allocate (size_type, const void *=0)
void deallocate (pointer, size_type)

Static Private Attributes

static _Tp m_buf [MAX_STATIC_ALLOC]
static int m_buf_index

Detailed Description

template<typename _Tp>
class Arcane::StaticAlloc< _Tp >

Static allocator for profiling.

Since profiling information is managed during interruption and can occur anywhere, standard allocation (new/malloc) must not be used; instead, use a static buffer. NOTE: this allocator is only valid for the ProfilingInfo class and must not be used elsewhere.

Definition at line 160 of file ProfilingInfo.h.

Member Typedef Documentation

◆ const_pointer

template<typename _Tp>
typedef const _Tp* Arcane::StaticAlloc< _Tp >::const_pointer

Definition at line 167 of file ProfilingInfo.h.

◆ const_reference

template<typename _Tp>
typedef const _Tp& Arcane::StaticAlloc< _Tp >::const_reference

Definition at line 169 of file ProfilingInfo.h.

◆ difference_type

template<typename _Tp>
typedef ptrdiff_t Arcane::StaticAlloc< _Tp >::difference_type

Definition at line 165 of file ProfilingInfo.h.

◆ pointer

template<typename _Tp>
typedef _Tp* Arcane::StaticAlloc< _Tp >::pointer

Definition at line 166 of file ProfilingInfo.h.

◆ reference

template<typename _Tp>
typedef _Tp& Arcane::StaticAlloc< _Tp >::reference

Definition at line 168 of file ProfilingInfo.h.

◆ size_type

template<typename _Tp>
typedef size_t Arcane::StaticAlloc< _Tp >::size_type

Definition at line 164 of file ProfilingInfo.h.

◆ value_type

template<typename _Tp>
typedef _Tp Arcane::StaticAlloc< _Tp >::value_type

Definition at line 170 of file ProfilingInfo.h.

Constructor & Destructor Documentation

◆ StaticAlloc() [1/3]

template<typename _Tp>
Arcane::StaticAlloc< _Tp >::StaticAlloc ( )
inline

Definition at line 178 of file ProfilingInfo.h.

◆ StaticAlloc() [2/3]

template<typename _Tp>
Arcane::StaticAlloc< _Tp >::StaticAlloc ( const StaticAlloc< _Tp > & )
inline

Definition at line 182 of file ProfilingInfo.h.

◆ StaticAlloc() [3/3]

template<typename _Tp>
template<typename _Tp1>
Arcane::StaticAlloc< _Tp >::StaticAlloc ( const StaticAlloc< _Tp1 > & )
inline

Definition at line 187 of file ProfilingInfo.h.

◆ ~StaticAlloc()

template<typename _Tp>
Arcane::StaticAlloc< _Tp >::~StaticAlloc ( )
inline

Definition at line 189 of file ProfilingInfo.h.

Member Function Documentation

◆ allocate()

template<typename _Tp>
pointer Arcane::StaticAlloc< _Tp >::allocate ( size_type ,
const void * = 0 )
inline

Definition at line 198 of file ProfilingInfo.h.

◆ construct()

template<typename _Tp>
void Arcane::StaticAlloc< _Tp >::construct ( pointer __p,
const _Tp & __val )
inline

Definition at line 191 of file ProfilingInfo.h.

◆ deallocate()

template<typename _Tp>
void Arcane::StaticAlloc< _Tp >::deallocate ( pointer ,
size_type  )
inline

Definition at line 210 of file ProfilingInfo.h.

◆ destroy()

template<typename _Tp>
void Arcane::StaticAlloc< _Tp >::destroy ( pointer __p)
inline

Definition at line 196 of file ProfilingInfo.h.

Member Data Documentation

◆ m_buf

template<typename _Tp>
_Tp Arcane::StaticAlloc< _Tp >::m_buf[MAX_STATIC_ALLOC]
staticprivate

Definition at line 219 of file ProfilingInfo.h.

◆ m_buf_index

template<typename _Tp>
int Arcane::StaticAlloc< _Tp >::m_buf_index
staticprivate

Definition at line 220 of file ProfilingInfo.h.


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