GCC Middle and Back End API Reference
mem_location Class Reference

#include <mem-stats.h>

Public Member Functions

 mem_location ()
 
 mem_location (mem_alloc_origin origin, bool ggc, const char *filename=NULL, int line=0, const char *function=NULL)
 
 mem_location (mem_location &other)
 
hashval_t hash ()
 
int equal (const mem_location &other)
 
const charget_trimmed_filename ()
 
charto_string ()
 

Static Public Member Functions

static const charget_origin_name (mem_alloc_origin origin)
 

Data Fields

const charm_filename
 
const charm_function
 
int m_line
 
mem_alloc_origin m_origin
 
bool m_ggc
 

Detailed Description

Memory allocation location.   

Constructor & Destructor Documentation

◆ mem_location() [1/3]

mem_location::mem_location ( )
inline

◆ mem_location() [2/3]

mem_location::mem_location ( mem_alloc_origin origin,
bool ggc,
const char * filename = NULL,
int line = 0,
const char * function = NULL )
inline

◆ mem_location() [3/3]

mem_location::mem_location ( mem_location & other)
inline

Member Function Documentation

◆ equal()

int mem_location::equal ( const mem_location & other)
inline

References m_filename, m_function, and m_line.

◆ get_origin_name()

static const char * mem_location::get_origin_name ( mem_alloc_origin origin)
inlinestatic

◆ get_trimmed_filename()

const char * mem_location::get_trimmed_filename ( )
inline

References ggc_alloc(), and m_filename.

Referenced by vec_usage::dump(), and to_string().

◆ hash()

hashval_t mem_location::hash ( )
inline

References inchash::hash::add_ptr(), hash(), m_filename, m_function, and m_line.

Referenced by hash().

◆ to_string()

Field Documentation

◆ m_filename

const char* mem_location::m_filename

Referenced by equal(), get_trimmed_filename(), and hash().

◆ m_function

const char* mem_location::m_function

◆ m_ggc

bool mem_location::m_ggc

◆ m_line

int mem_location::m_line

◆ m_origin

mem_alloc_origin mem_location::m_origin

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