25#ifndef COUNTING_CALLOCATOR_HPP
26#define COUNTING_CALLOCATOR_HPP
78 constexpr void flush_stats() noexcept {
104#if __cplusplus > 201703L
124#if __cplusplus > 201703L
125 template <
typename U>
135 template <
typename U>
146#if __cplusplus > 201703L
152#if __cplusplus <= 201703L
162#if __cplusplus > 201703L
183 if(
nullptr != res ) {
191#if __cplusplus > 201703L
211#if __cplusplus > 201703L
212template <
class T1,
class T2>
213 constexpr bool operator==(
const counting_callocator<T1>& lhs,
const counting_callocator<T2>& rhs)
noexcept {
218 return lhs.memory_usage == rhs.memory_usage;
226 template <
class T1,
class T2>
232 return lhs.memory_usage == rhs.memory_usage;
239 template <
class T1,
class T2>
uint_fast32_t nsize_t
Natural 'size_t' alternative using uint_fast32_t as its natural sized type.
std::string to_decstring(const value_type &v, const char separator=',', const nsize_t width=0) noexcept
Produce a decimal string representation of an integral integer value.
__pack(...): Produces MSVC, clang and gcc compatible lead-in and -out macros.
bool operator==(const callocator< T1 > &lhs, const callocator< T2 > &rhs) noexcept
bool operator!=(const callocator< T1 > &lhs, const callocator< T2 > &rhs) noexcept
A simple allocator using POSIX C functions: ::malloc(), ::free() and ::realloc().
constexpr value_type * reallocate(value_type *p, std::size_t, std::size_t new_size)
value_type * allocate(std::size_t n, const void *)
void deallocate(value_type *p, std::size_t)
counting_callocator< U > other
Performance counter jau::callocator specialization.
constexpr value_type * reallocate(value_type *p, std::size_t old_size, std::size_t new_size)
value_type * allocate(std::size_t n, const void *hint)
std::size_t dealloc_count
~counting_callocator()=default
std::size_t realloc_count
counting_callocator(const counting_callocator< U > &other) noexcept
counting_callocator(const counting_callocator &other) noexcept
std::string toString(const nsize_t mem_width=0, const nsize_t count_width=0)
void deallocate(value_type *p, std::size_t n)
value_type * allocate(std::size_t n)
counting_callocator() noexcept