ATLAS Offline Software
Loading...
Searching...
No Matches
SG::ArenaAllocatorBase::Stats Struct Reference

Statistics for an allocator. More...

#include <ArenaAllocatorBase.h>

Collaboration diagram for SG::ArenaAllocatorBase::Stats:

Classes

struct  Stat
 A single statistic. More...

Public Member Functions

 Stats ()=default
void clear ()
 Reset to zero.
Statsoperator+= (const Stats &other)
 Accumulate.

Static Public Member Functions

static void header (std::ostream &os)
 Print report header.

Public Attributes

Stat blocks
 Counts of blocks.
Stat elts
 Counts of elements.
Stat bytes
 Counts of bytes.

Detailed Description

Statistics for an allocator.

See above for more details.

Definition at line 188 of file ArenaAllocatorBase.h.

Constructor & Destructor Documentation

◆ Stats()

SG::ArenaAllocatorBase::Stats::Stats ( )
default

Member Function Documentation

◆ clear()

void SG::ArenaAllocatorBase::Stats::clear ( )

Reset to zero.

Zero a complete statistics block.

Definition at line 77 of file ArenaAllocatorBase.cxx.

78{
79 elts.clear();
80 bytes.clear();
81 blocks.clear();
82}

◆ header()

void SG::ArenaAllocatorBase::Stats::header ( std::ostream & os)
static

Print report header.

Write a header for the statistics report.

Parameters
osThe stream to which to write.

Definition at line 116 of file ArenaAllocatorBase.cxx.

117{
118 os << "Elts InUse/Free/Total"
119 << " Bytes InUse/Free/Total Blocks InUse/Free/Total";
120}

◆ operator+=()

ArenaAllocatorBase::Stats & SG::ArenaAllocatorBase::Stats::operator+= ( const Stats & other)

Accumulate.

Accumulate a complete statistics block.

Parameters
otherThe statistics block to accumulate into this one.

Definition at line 90 of file ArenaAllocatorBase.cxx.

91{
92 elts += other.elts;
93 bytes += other.bytes;
94 blocks += other.blocks;
95 return *this;
96}

Member Data Documentation

◆ blocks

Stat SG::ArenaAllocatorBase::Stats::blocks

Counts of blocks.

Definition at line 217 of file ArenaAllocatorBase.h.

◆ bytes

Stat SG::ArenaAllocatorBase::Stats::bytes

Counts of bytes.

Definition at line 221 of file ArenaAllocatorBase.h.

◆ elts

Stat SG::ArenaAllocatorBase::Stats::elts

Counts of elements.

Definition at line 219 of file ArenaAllocatorBase.h.


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