mitteLib
Loading...
Searching...
No Matches
mlab::mem_stats Class Reference

#include <tracker_allocator.hpp>

Collaboration diagram for mlab::mem_stats:

Public Member Functions

mem_counter const & total () const
 
mem_counter const & block_by_size (std::size_t bytes) const
 
void print_stats () const
 
void allocate (std::size_t bytes)
 
void deallocate (std::size_t bytes)
 

Static Public Member Functions

static mem_statsinstance ()
 

Private Member Functions

mem_counter const & by_size (std::size_t bytes) const
 
mem_counterby_size (std::size_t bytes)
 

Private Attributes

std::array< mem_counter, 20 > _blocks
 
mem_counter _total
 

Member Function Documentation

◆ allocate()

void mlab::mem_stats::allocate ( std::size_t bytes)

◆ block_by_size()

mem_counter const & mlab::mem_stats::block_by_size ( std::size_t bytes) const
nodiscard

◆ by_size() [1/2]

mem_counter & mlab::mem_stats::by_size ( std::size_t bytes)
nodiscardprivate

◆ by_size() [2/2]

mem_counter const & mlab::mem_stats::by_size ( std::size_t bytes) const
nodiscardprivate

◆ deallocate()

void mlab::mem_stats::deallocate ( std::size_t bytes)

◆ instance()

mem_stats & mlab::mem_stats::instance ( )
staticnodiscard

◆ print_stats()

void mlab::mem_stats::print_stats ( ) const

◆ total()

mem_counter const & mlab::mem_stats::total ( ) const
nodiscard

Member Data Documentation

◆ _blocks

std::array<mem_counter, 20> mlab::mem_stats::_blocks
private

◆ _total

mem_counter mlab::mem_stats::_total
private

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