Direct-BT  2.3.1
Direct-BT - Direct Bluetooth Programming.
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
jau::counting_callocator< T > Struct Template Reference

Performance counter jau::callocator specialization. More...

#include <counting_callocator.hpp>

Inheritance diagram for jau::counting_callocator< T >:
Collaboration diagram for jau::counting_callocator< T >:

Classes

struct  rebind
 

Public Types

typedef T value_type
 
- Public Types inherited from jau::callocator< T >
typedef T value_type
 

Public Member Functions

std::string toString (const nsize_t mem_width=0, const nsize_t count_width=0)
 
 counting_callocator () noexcept
 
 counting_callocator (const counting_callocator &other) noexcept
 
template<typename U >
 counting_callocator (const counting_callocator< U > &other) noexcept
 
 ~counting_callocator ()
 
value_typeallocate (std::size_t n, const void *hint)
 
value_typeallocate (std::size_t n)
 
constexpr value_typereallocate (value_type *p, std::size_t old_size, std::size_t new_size)
 
void deallocate (value_type *p, std::size_t n)
 
- Public Member Functions inherited from jau::callocator< T >
 callocator () noexcept
 
 callocator (const callocator &other) noexcept
 
template<typename U >
 callocator (const callocator< U > &other) noexcept
 
 ~callocator ()
 
value_typeallocate (std::size_t n, const void *hint)
 
value_typeallocate (std::size_t n)
 
constexpr value_typereallocate (value_type *p, std::size_t old_size, std::size_t new_size)
 
void deallocate (value_type *p, std::size_t n)
 

Public Attributes

bool old_stats
 
std::size_t memory_usage
 
std::size_t alloc_count
 
std::size_t dealloc_count
 
std::size_t realloc_count
 
ssize_t alloc_balance
 

Detailed Description

template<class T>
struct jau::counting_callocator< T >

Performance counter jau::callocator specialization.

This class shall be compliant with C++ named requirements for Allocator.

Not overriding deprecated (C++17) and removed (C++20) methods: address(), max_size(), construct() and destroy().

Definition at line 47 of file counting_callocator.hpp.

Member Typedef Documentation

◆ value_type

template<class T >
typedef T jau::counting_callocator< T >::value_type

Definition at line 53 of file counting_callocator.hpp.

Constructor & Destructor Documentation

◆ counting_callocator() [1/3]

template<class T >
jau::counting_callocator< T >::counting_callocator ( )
inlinenoexcept

Definition at line 97 of file counting_callocator.hpp.

◆ counting_callocator() [2/3]

template<class T >
jau::counting_callocator< T >::counting_callocator ( const counting_callocator< T > &  other)
inlinenoexcept

Definition at line 114 of file counting_callocator.hpp.

◆ counting_callocator() [3/3]

template<class T >
template<typename U >
jau::counting_callocator< T >::counting_callocator ( const counting_callocator< U > &  other)
inlinenoexcept

Definition at line 136 of file counting_callocator.hpp.

◆ ~counting_callocator()

template<class T >
jau::counting_callocator< T >::~counting_callocator ( )
inline

Definition at line 149 of file counting_callocator.hpp.

Member Function Documentation

◆ allocate() [1/2]

template<class T >
value_type* jau::counting_callocator< T >::allocate ( std::size_t  n)
inline

Definition at line 171 of file counting_callocator.hpp.

Here is the call graph for this function:

◆ allocate() [2/2]

template<class T >
value_type* jau::counting_callocator< T >::allocate ( std::size_t  n,
const void *  hint 
)
inline

Definition at line 153 of file counting_callocator.hpp.

Here is the call graph for this function:

◆ deallocate()

template<class T >
void jau::counting_callocator< T >::deallocate ( value_type p,
std::size_t  n 
)
inline

Definition at line 200 of file counting_callocator.hpp.

Here is the call graph for this function:

◆ reallocate()

template<class T >
constexpr value_type* jau::counting_callocator< T >::reallocate ( value_type p,
std::size_t  old_size,
std::size_t  new_size 
)
inlineconstexpr

Definition at line 180 of file counting_callocator.hpp.

Here is the call graph for this function:

◆ toString()

template<class T >
std::string jau::counting_callocator< T >::toString ( const nsize_t  mem_width = 0,
const nsize_t  count_width = 0 
)
inline

Definition at line 90 of file counting_callocator.hpp.

Here is the call graph for this function:

Member Data Documentation

◆ alloc_balance

template<class T >
ssize_t jau::counting_callocator< T >::alloc_balance

Definition at line 61 of file counting_callocator.hpp.

◆ alloc_count

template<class T >
std::size_t jau::counting_callocator< T >::alloc_count

Definition at line 58 of file counting_callocator.hpp.

◆ dealloc_count

template<class T >
std::size_t jau::counting_callocator< T >::dealloc_count

Definition at line 59 of file counting_callocator.hpp.

◆ memory_usage

template<class T >
std::size_t jau::counting_callocator< T >::memory_usage

Definition at line 57 of file counting_callocator.hpp.

◆ old_stats

template<class T >
bool jau::counting_callocator< T >::old_stats

Definition at line 56 of file counting_callocator.hpp.

◆ realloc_count

template<class T >
std::size_t jau::counting_callocator< T >::realloc_count

Definition at line 60 of file counting_callocator.hpp.


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