GCC Middle and Back End API Reference
mem_usage Class Reference

#include <mem-stats.h>

Inheritance diagram for mem_usage:

Public Member Functions

 mem_usage ()
 
 mem_usage (size_t allocated, size_t times, size_t peak, size_t instances=0)
 
void register_overhead (size_t size)
 
void release_overhead (size_t size)
 
mem_usage operator+ (const mem_usage &second)
 
bool operator== (const mem_usage &second) const
 
bool operator< (const mem_usage &second) const
 
void dump (mem_location *loc, const mem_usage &total) const
 
void dump_footer () const
 

Static Public Member Functions

static int compare (const void *first, const void *second)
 
static float get_percent (size_t nominator, size_t denominator)
 
static void print_dash_line (size_t count=140)
 
static void dump_header (const char *name)
 

Data Fields

size_t m_allocated
 
size_t m_times
 
size_t m_peak
 
size_t m_instances
 

Detailed Description

Memory usage register to a memory location.   

Constructor & Destructor Documentation

◆ mem_usage() [1/2]

mem_usage::mem_usage ( )
inline

Referenced by operator+().

◆ mem_usage() [2/2]

mem_usage::mem_usage ( size_t allocated,
size_t times,
size_t peak,
size_t instances = 0 )
inline

Member Function Documentation

◆ compare()

static int mem_usage::compare ( const void * first,
const void * second )
inlinestatic

◆ dump()

◆ dump_footer()

void mem_usage::dump_footer ( ) const
inline

◆ dump_header()

static void mem_usage::dump_header ( const char * name)
inlinestatic

References ggc_alloc().

◆ get_percent()

static float mem_usage::get_percent ( size_t nominator,
size_t denominator )
inlinestatic

◆ operator+()

mem_usage mem_usage::operator+ ( const mem_usage & second)
inline

◆ operator<()

bool mem_usage::operator< ( const mem_usage & second) const
inline

References m_allocated, m_peak, and m_times.

◆ operator==()

bool mem_usage::operator== ( const mem_usage & second) const
inline

References m_allocated, m_peak, and m_times.

◆ print_dash_line()

static void mem_usage::print_dash_line ( size_t count = 140)
inlinestatic

References count, fputc(), and ggc_alloc().

Referenced by dump_tree_statistics().

◆ register_overhead()

void mem_usage::register_overhead ( size_t size)
inline

References m_allocated, m_peak, and m_times.

◆ release_overhead()

void mem_usage::release_overhead ( size_t size)
inline

References gcc_assert, and m_allocated.

Field Documentation

◆ m_allocated

◆ m_instances

◆ m_peak

◆ m_times


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