GCC Middle and Back End API Reference
ggc_usage Class Reference
Inheritance diagram for ggc_usage:
Collaboration diagram for ggc_usage:

Public Types

typedef std::pair< mem_location *, ggc_usage * > mem_pair_t
 

Public Member Functions

 ggc_usage ()
 
 ggc_usage (size_t allocated, size_t times, size_t peak, size_t freed, size_t collected, size_t overhead)
 
bool operator== (const ggc_usage &second) const
 
bool operator< (const ggc_usage &second) const
 
void register_overhead (size_t allocated, size_t overhead)
 
void release_overhead (size_t size)
 
ggc_usage operator+ (const ggc_usage &second)
 
void dump (const char *prefix, ggc_usage &total) const
 
void dump (mem_location *loc, ggc_usage &total) const
 
void dump_footer ()
 
size_t get_balance () const
 
void register_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 void dump_header (const char *name)
 
static float get_percent (size_t nominator, size_t denominator)
 
static void print_dash_line (size_t count=140)
 

Data Fields

size_t m_freed
 
size_t m_collected
 
size_t m_overhead
 
size_t m_allocated
 
size_t m_times
 
size_t m_peak
 
size_t m_instances
 

Detailed Description

GGC memory usage.   

Member Typedef Documentation

◆ mem_pair_t

Constructor & Destructor Documentation

◆ ggc_usage() [1/2]

ggc_usage::ggc_usage ( )
inline

Referenced by operator+().

◆ ggc_usage() [2/2]

ggc_usage::ggc_usage ( size_t allocated,
size_t times,
size_t peak,
size_t freed,
size_t collected,
size_t overhead )
inline

Member Function Documentation

◆ compare()

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

◆ dump() [1/3]

void ggc_usage::dump ( const char * prefix,
ggc_usage & total ) const
inline

◆ dump() [2/3]

void ggc_usage::dump ( mem_location * loc,
ggc_usage & total ) const
inline

◆ dump() [3/3]

◆ dump_footer() [1/2]

void ggc_usage::dump_footer ( )
inline

References dump().

◆ dump_footer() [2/2]

void mem_usage::dump_footer ( ) const
inlineinherited

◆ dump_header()

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

◆ get_balance()

size_t ggc_usage::get_balance ( ) const
inline

◆ get_percent()

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

◆ operator+() [1/2]

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

◆ operator+() [2/2]

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

◆ operator<() [1/2]

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

◆ operator<() [2/2]

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

◆ operator==() [1/2]

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

◆ operator==() [2/2]

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

◆ print_dash_line()

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

References count, and fputc().

Referenced by dump_tree_statistics().

◆ register_overhead() [1/2]

void ggc_usage::register_overhead ( size_t allocated,
size_t overhead )
inline

◆ register_overhead() [2/2]

void mem_usage::register_overhead ( size_t size)
inlineinherited

◆ release_overhead()

void ggc_usage::release_overhead ( size_t size)
inline

References m_freed.

Field Documentation

◆ m_allocated

◆ m_collected

size_t ggc_usage::m_collected

Referenced by dump(), get_balance(), and operator+().

◆ m_freed

size_t ggc_usage::m_freed

◆ m_instances

size_t mem_usage::m_instances
inherited

◆ m_overhead

size_t ggc_usage::m_overhead

◆ m_peak

◆ m_times


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