osprey/common/util/memory.c File Reference

#include <sys/types.h>
#include <malloc.h>
#include <bstring.h>
#include "defs.h"
#include "mempool.h"
#include "tracing.h"
#include "erglob.h"

Include dependency graph for memory.c:

Go to the source code of this file.

Data Types

type  mem_block
type  mem_large_block
type  int_list
type  mem_stat
type  mem_pool_blocks
type  mem_pure_stack

Defines

#define REDZONE_SIZE   redzone_size
#define MEM_POOL_INIT_IN_PROGRESS   (-1)
#define BLOCK_SIZE   0x2000
#define MIN_LARGE_BLOCK_SIZE   0x800
#define MEM_BLOCK_avail(x)   ((x)->avail)
#define MEM_BLOCK_ptr(x)   ((x)->ptr)
#define MEM_BLOCK_rest(x)   ((x)->rest)
#define MEM_BLOCK_first_ptr(x)   (MEM_PTR) (((char *) (x)) + PAD_TO_ALIGN(sizeof(MEM_BLOCK)))
#define MEM_LARGE_BLOCK_next(x)   ((x)->next)
#define MEM_LARGE_BLOCK_prev(x)   ((x)->prev)
#define MEM_LARGE_BLOCK_base(x)   ((x)->base)
#define MEM_LARGE_BLOCK_ptr(x)   ((x)->ptr)
#define MEM_LARGE_BLOCK_OVERHEAD   (PAD_TO_ALIGN(sizeof(MEM_LARGE_BLOCK)))
#define INT_LIST_first(x)   ((x)->first)
#define INT_LIST_rest(x)   ((x)->rest)
#define MEM_STAT_file(x)   ((x)->file)
#define MEM_STAT_line(x)   ((x)->line)
#define MEM_STAT_total(x)   ((x)->total)
#define MEM_STAT_current(x)   ((x)->current)
#define MEM_STAT_max_t(x)   ((x)->max_t)
#define MEM_STAT_max_s(x)   ((x)->max_s)
#define MEM_STAT_last(x)   ((x)->last)
#define MEM_STAT_last_grew(x)   ((x)->last_grew)
#define MEM_STAT_last_shrank(x)   ((x)->last_shrank)
#define MEM_STAT_count(x)   ((x)->count)
#define MEM_STAT_hash_list_rest(x)   ((x)->hash_list_rest)
#define MEM_STAT_pool_list_rest(x)   ((x)->pool_list_rest)
#define MEM_STAT_saved_current(x)   ((x)->saved_current)
#define MEM_STAT_pool(x)   ((x)->pool)
#define MEM_POOL_BLOCKS_block(x)   ((x)->block)
#define MEM_POOL_BLOCKS_large_block(x)   ((x)->large_block)
#define MEM_POOL_BLOCKS_base_block(x)   ((x)->base_block)
#define MEM_POOL_BLOCKS_base_ptr(x)   ((x)->base_ptr)
#define MEM_POOL_BLOCKS_base_avail(x)   ((x)->base_avail)
#define MEM_POOL_BLOCKS_rest(x)   ((x)->rest)
#define MEM_PURE_STACK_last_alloc(x)   ((x)->last_alloc)
#define MEM_PURE_STACK_prev_stack(x)   ((x)->prev_stack)
#define MEM_POOL_last_alloc(x)   MEM_PURE_STACK_last_alloc(MEM_POOL_pure_stack(x))
#define MEM_POOL_prev_stack(x)   MEM_PURE_STACK_prev_stack(MEM_POOL_pure_stack(x))
#define MAGIC_NUM   0xabcd
#define MEM_POOL_name(x)   ((x)->name)
#define MEM_POOL_blocks(x)   ((x)->blocks)
#define MEM_POOL_bz(x)   ((x)->bz)
#define MEM_POOL_rest(x)   ((x)->rest)
#define MEM_POOL_pure_stack(x)   ((x)->pure_stack)
#define MEM_POOL_frozen(x)   ((x)->frozen)
#define MEM_POOL_magic_num(x)   ((x)->magic_num)
#define MEM_POOL_alloc_site_list(x)   ((x)->alloc_site_list)
#define MEM_POOL_block(x)   MEM_POOL_BLOCKS_block(MEM_POOL_blocks(x))
#define MEM_POOL_large_block(x)   MEM_POOL_BLOCKS_large_block(MEM_POOL_blocks(x))
#define PAD_TO_ALIGN(size)   (((size) + 7) & (~0U << 3))
#define N_BUCKETS   503

Typedefs

typedef struct mem_large_block MEM_LARGE_BLOCK
typedef struct int_list INT_LIST
typedef INT(* QSORT_FUNC )(const void *, const void *)

Functions/Subroutines

static void MEM_LARGE_BLOCK_zap (MEM_LARGE_BLOCK *block)
static void MEM_LARGE_BLOCK_free (MEM_LARGE_BLOCK *block)
static MEM_LARGE_BLOCKMEM_LARGE_BLOCK_realloc (MEM_LARGE_BLOCK *old_block, INT64 new_size)
static void PURIFY_OPT_Initialize (void)
static UINT32 Hash (INT32 line, const char *file)
static MEM_STATHash_Get (UINT32 hn, MEM_POOL *pool, INT32 line, const char *file)
static void Site_Account_Alloc (MEM_POOL *pool, size_t old_size, size_t new_size)
static void Site_Account_Pop (MEM_POOL *pool)
static void Site_Account_Push (MEM_POOL *pool)
static INT32 Field_Size (INT32 i)
static INT MEM_STAT_Sort (MEM_STAT **as1p, MEM_STAT **as2p)
static BOOL MEM_STAT_In_List (MEM_POOL *list, MEM_POOL *pool)
INT32 MEM_POOL_Report (MEM_POOL *pool, INT32 used_total)
void MEM_Trace (void)
void Trace_Memory_Allocation (const INT phase, const char *const pname)
void MEM_Tracing_Enable (void)
static MEM_PTR Allocate_Block (MEM_POOL *pool)
static MEM_PTR Allocate_Large_Block (MEM_POOL *pool, INT32 size)
static MEM_PTR Raw_Allocate (MEM_POOL *pool, INT32 size)
MEM_PTR MEM_POOL_Alloc_P (MEM_POOL *pool, size_t size)
MEM_PTR MEM_POOL_Realloc_P (MEM_POOL *pool, MEM_PTR old_block, size_t old_size, size_t new_size)
void MEM_POOL_Push_P (MEM_POOL *pool)
void MEM_POOL_Push_Freeze_P (MEM_POOL *pool)
void MEM_POOL_Pop_P (MEM_POOL *pool)
void MEM_POOL_Pop_Unfreeze_P (MEM_POOL *pool)
void MEM_POOL_Set_Default (MEM_POOL *pool)
void MEM_POOL_FREE (MEM_POOL *pool, void *data)
void MEM_POOL_Delete (MEM_POOL *pool)
void MEM_POOL_Initialize_P (MEM_POOL *pool, const char *name, BOOL bzero)
void MEM_Initialize (void)
MEM_PTR Realloc_Clear (MEM_PTR ptr, INT32 new_size, INT32 old_size)
MEM_PTR Re_Calloc (MEM_PTR ptr, INT32 new_nelem, INT32 elsize, INT32 old_nelem)

Variables

static int redzone_size = 0
MEM_POOL MEM_local_pool
MEM_POOL MEM_src_pool
MEM_POOL MEM_pu_pool
MEM_POOL MEM_phase_pool
MEM_POOLMEM_local_pool_ptr = &MEM_local_pool
MEM_POOLMEM_src_pool_ptr = &MEM_src_pool
MEM_POOLMEM_pu_pool_ptr = &MEM_pu_pool
MEM_POOLMEM_phase_pool_ptr = &MEM_phase_pool
MEM_POOL MEM_local_nz_pool
MEM_POOL MEM_src_nz_pool
MEM_POOL MEM_pu_nz_pool
MEM_POOL MEM_phase_nz_pool
MEM_POOLMEM_local_nz_pool_ptr = &MEM_local_nz_pool
MEM_POOLMEM_src_nz_pool_ptr = &MEM_src_nz_pool
MEM_POOLMEM_pu_nz_pool_ptr = &MEM_pu_nz_pool
MEM_POOLMEM_phase_nz_pool_ptr = &MEM_phase_nz_pool
static INT_LISTfree_int_lists
BOOL purify_pools = FALSE
static BOOL purify_pools_trace = FALSE
static BOOL purify_pools_trace_x = FALSE
static MEM_POOL_BLOCKSfree_mem_pool_blocks_list
static MEM_POOL_BLOCKS overhead_blocks
static MEM_POOL mem_overhead_pool
static MEM_POOLThe_Default_Mem_Pool
static BOOL mem_tracing_enabled = FALSE
static MEM_STATcall_site_hash_tab [N_BUCKETS]


Define Documentation

#define BLOCK_SIZE   0x2000

Definition at line 105 of file memory.c.

#define INT_LIST_first (  )     ((x)->first)

Definition at line 252 of file memory.c.

Referenced by Site_Account_Pop(), and Site_Account_Push().

#define INT_LIST_rest (  )     ((x)->rest)

Definition at line 253 of file memory.c.

Referenced by Site_Account_Pop(), and Site_Account_Push().

#define MAGIC_NUM   0xabcd

#define MEM_BLOCK_avail (  )     ((x)->avail)

Definition at line 171 of file memory.c.

Referenced by Allocate_Block(), MEM_POOL_Pop_P(), MEM_POOL_Push_P(), and Raw_Allocate().

#define MEM_BLOCK_first_ptr (  )     (MEM_PTR) (((char *) (x)) + PAD_TO_ALIGN(sizeof(MEM_BLOCK)))

Definition at line 175 of file memory.c.

Referenced by Allocate_Block(), and MEM_POOL_Pop_P().

#define MEM_BLOCK_ptr (  )     ((x)->ptr)

Definition at line 172 of file memory.c.

Referenced by Allocate_Block(), MEM_POOL_Pop_P(), MEM_POOL_Push_P(), and Raw_Allocate().

#define MEM_BLOCK_rest (  )     ((x)->rest)

Definition at line 173 of file memory.c.

Referenced by Allocate_Block(), and MEM_POOL_Pop_P().

#define MEM_LARGE_BLOCK_base (  )     ((x)->base)

#define MEM_LARGE_BLOCK_next (  )     ((x)->next)

Definition at line 191 of file memory.c.

Referenced by Allocate_Large_Block(), MEM_POOL_FREE(), MEM_POOL_Pop_P(), and MEM_POOL_Realloc_P().

#define MEM_LARGE_BLOCK_OVERHEAD   (PAD_TO_ALIGN(sizeof(MEM_LARGE_BLOCK)))

Definition at line 195 of file memory.c.

Referenced by Allocate_Large_Block(), MEM_POOL_FREE(), and MEM_POOL_Realloc_P().

#define MEM_LARGE_BLOCK_prev (  )     ((x)->prev)

Definition at line 192 of file memory.c.

Referenced by Allocate_Large_Block(), MEM_POOL_FREE(), and MEM_POOL_Realloc_P().

#define MEM_LARGE_BLOCK_ptr (  )     ((x)->ptr)

#define MEM_POOL_alloc_site_list (  )     ((x)->alloc_site_list)

#define MEM_POOL_block (  )     MEM_POOL_BLOCKS_block(MEM_POOL_blocks(x))

Definition at line 430 of file memory.c.

Referenced by Allocate_Block(), and Raw_Allocate().

#define MEM_POOL_blocks (  )     ((x)->blocks)

#define MEM_POOL_BLOCKS_base_avail (  )     ((x)->base_avail)

Definition at line 353 of file memory.c.

Referenced by MEM_POOL_Pop_P(), and MEM_POOL_Push_P().

#define MEM_POOL_BLOCKS_base_block (  )     ((x)->base_block)

Definition at line 351 of file memory.c.

Referenced by MEM_POOL_Pop_P(), and MEM_POOL_Push_P().

#define MEM_POOL_BLOCKS_base_ptr (  )     ((x)->base_ptr)

Definition at line 352 of file memory.c.

Referenced by MEM_POOL_Pop_P(), and MEM_POOL_Push_P().

#define MEM_POOL_BLOCKS_block (  )     ((x)->block)

Definition at line 349 of file memory.c.

Referenced by MEM_POOL_Pop_P(), and MEM_POOL_Push_P().

#define MEM_POOL_BLOCKS_large_block (  )     ((x)->large_block)

Definition at line 350 of file memory.c.

Referenced by MEM_POOL_Pop_P(), and MEM_POOL_Push_P().

#define MEM_POOL_BLOCKS_rest (  )     ((x)->rest)

Definition at line 354 of file memory.c.

Referenced by MEM_POOL_Delete(), MEM_POOL_Pop_P(), and MEM_POOL_Push_P().

#define MEM_POOL_bz (  )     ((x)->bz)

#define MEM_POOL_frozen (  )     ((x)->frozen)

#define MEM_POOL_INIT_IN_PROGRESS   (-1)

Definition at line 98 of file memory.c.

Referenced by MEM_POOL_Initialize_P(), and MEM_POOL_Push_P().

#define MEM_POOL_large_block (  )     MEM_POOL_BLOCKS_large_block(MEM_POOL_blocks(x))

Definition at line 432 of file memory.c.

Referenced by Allocate_Large_Block(), MEM_POOL_FREE(), and MEM_POOL_Realloc_P().

#define MEM_POOL_last_alloc (  )     MEM_PURE_STACK_last_alloc(MEM_POOL_pure_stack(x))

Definition at line 407 of file memory.c.

Referenced by MEM_POOL_Alloc_P(), MEM_POOL_Pop_P(), and MEM_POOL_Realloc_P().

#define MEM_POOL_magic_num (  )     ((x)->magic_num)

#define MEM_POOL_name (  )     ((x)->name)

#define MEM_POOL_prev_stack (  )     MEM_PURE_STACK_prev_stack(MEM_POOL_pure_stack(x))

Definition at line 409 of file memory.c.

Referenced by MEM_POOL_Pop_P().

#define MEM_POOL_pure_stack (  )     ((x)->pure_stack)

#define MEM_POOL_rest (  )     ((x)->rest)

Definition at line 424 of file memory.c.

Referenced by MEM_POOL_Delete(), MEM_POOL_Initialize_P(), MEM_STAT_In_List(), and MEM_Trace().

#define MEM_PURE_STACK_last_alloc (  )     ((x)->last_alloc)

Definition at line 405 of file memory.c.

Referenced by MEM_POOL_FREE(), MEM_POOL_Push_P(), and MEM_POOL_Realloc_P().

#define MEM_PURE_STACK_prev_stack (  )     ((x)->prev_stack)

Definition at line 406 of file memory.c.

Referenced by MEM_POOL_FREE(), MEM_POOL_Push_P(), and MEM_POOL_Realloc_P().

#define MEM_STAT_count (  )     ((x)->count)

Definition at line 317 of file memory.c.

Referenced by MEM_POOL_Report(), and Site_Account_Alloc().

#define MEM_STAT_current (  )     ((x)->current)

Definition at line 311 of file memory.c.

Referenced by MEM_POOL_Report(), Site_Account_Alloc(), Site_Account_Pop(), and Site_Account_Push().

#define MEM_STAT_file (  )     ((x)->file)

Definition at line 308 of file memory.c.

Referenced by Hash_Get(), MEM_POOL_Report(), and Site_Account_Alloc().

#define MEM_STAT_hash_list_rest (  )     ((x)->hash_list_rest)

Definition at line 318 of file memory.c.

Referenced by Hash_Get(), and Site_Account_Alloc().

#define MEM_STAT_last (  )     ((x)->last)

Definition at line 314 of file memory.c.

Referenced by Site_Account_Alloc().

#define MEM_STAT_last_grew (  )     ((x)->last_grew)

Definition at line 315 of file memory.c.

Referenced by MEM_POOL_Report(), and Site_Account_Alloc().

#define MEM_STAT_last_shrank (  )     ((x)->last_shrank)

Definition at line 316 of file memory.c.

Referenced by MEM_POOL_Report(), and Site_Account_Alloc().

#define MEM_STAT_line (  )     ((x)->line)

Definition at line 309 of file memory.c.

Referenced by Hash_Get(), MEM_POOL_Report(), and Site_Account_Alloc().

#define MEM_STAT_max_s (  )     ((x)->max_s)

Definition at line 313 of file memory.c.

Referenced by MEM_POOL_Report(), and Site_Account_Alloc().

#define MEM_STAT_max_t (  )     ((x)->max_t)

Definition at line 312 of file memory.c.

Referenced by MEM_POOL_Report(), MEM_STAT_Sort(), and Site_Account_Alloc().

#define MEM_STAT_pool (  )     ((x)->pool)

Definition at line 321 of file memory.c.

Referenced by Hash_Get(), and Site_Account_Alloc().

#define MEM_STAT_pool_list_rest (  )     ((x)->pool_list_rest)

Definition at line 319 of file memory.c.

Referenced by MEM_POOL_Report(), Site_Account_Alloc(), Site_Account_Pop(), and Site_Account_Push().

#define MEM_STAT_saved_current (  )     ((x)->saved_current)

Definition at line 320 of file memory.c.

Referenced by Site_Account_Pop(), and Site_Account_Push().

#define MEM_STAT_total (  )     ((x)->total)

Definition at line 310 of file memory.c.

Referenced by MEM_POOL_Report(), and Site_Account_Alloc().

#define MIN_LARGE_BLOCK_SIZE   0x800

Definition at line 110 of file memory.c.

Referenced by MEM_POOL_Realloc_P(), and Raw_Allocate().

#define N_BUCKETS   503

Definition at line 478 of file memory.c.

Referenced by Hash().

#define PAD_TO_ALIGN ( size   )     (((size) + 7) & (~0U << 3))

Definition at line 465 of file memory.c.

Referenced by Allocate_Block(), MEM_POOL_Alloc_P(), and MEM_POOL_Realloc_P().

#define REDZONE_SIZE   redzone_size

Definition at line 91 of file memory.c.

Referenced by MEM_POOL_Initialize_P(), MEM_POOL_Pop_P(), MEM_POOL_Push_P(), and Raw_Allocate().


Typedef Documentation

Definition at line 243 of file memory.c.

Definition at line 183 of file memory.c.

typedef INT(* QSORT_FUNC)(const void *, const void *)

Definition at line 720 of file memory.c.


Function Documentation

static MEM_PTR Allocate_Block ( MEM_POOL pool  )  [static]

static MEM_PTR Allocate_Large_Block ( MEM_POOL pool,
INT32  size 
) [static]

static INT32 Field_Size ( INT32  i  )  [static]

Definition at line 694 of file memory.c.

References sprintf(), and strlen().

Referenced by MEM_POOL_Report().

static UINT32 Hash ( INT32  line,
const char *  file 
) [static]

Definition at line 496 of file memory.c.

References N_BUCKETS, p, result, and UINT32.

Referenced by Site_Account_Alloc().

static MEM_STAT* Hash_Get ( UINT32  hn,
MEM_POOL pool,
INT32  line,
const char *  file 
) [static]

Definition at line 528 of file memory.c.

References MEM_STAT_file, MEM_STAT_hash_list_rest, MEM_STAT_line, MEM_STAT_pool, NULL, and strcmp().

Referenced by Site_Account_Alloc().

void MEM_Initialize ( void   ) 

Definition at line 2064 of file memory.c.

Referenced by ipa_dot_so_init(), main(), sgi_cmd_line(), WFE_Init(), and WGEN_Init().

static void MEM_LARGE_BLOCK_free ( MEM_LARGE_BLOCK block  )  [static]

Definition at line 216 of file memory.c.

References free(), and MEM_LARGE_BLOCK_zap().

Referenced by MEM_POOL_FREE(), and MEM_POOL_Pop_P().

static MEM_LARGE_BLOCK* MEM_LARGE_BLOCK_realloc ( MEM_LARGE_BLOCK old_block,
INT64  new_size 
) [static]

static void MEM_LARGE_BLOCK_zap ( MEM_LARGE_BLOCK block  )  [static]

Definition at line 209 of file memory.c.

References MEM_LARGE_BLOCK_base, MEM_LARGE_BLOCK_ptr, and NULL.

Referenced by MEM_LARGE_BLOCK_free(), and MEM_LARGE_BLOCK_realloc().

MEM_PTR MEM_POOL_Alloc_P ( MEM_POOL pool,
size_t  size 
)

void MEM_POOL_Delete ( MEM_POOL pool  ) 

Definition at line 1818 of file memory.c.

Referenced by Alloc_Regs_For_BB(), Anl_Fini(), Anl_Static_Analysis(), Automatic_Data_Distribute(), BE_symtab_free_be_scopes(), Cache_Analysis_End(), CG_DEP_Delete_Graph(), CG_End_Gcov(), CG_Fini(), CGGRP_Fini(), Clear_Common_Block_Element_Map(), Clear_Extra_Auxiliary_Tables(), Convert_x87_Regs(), Create_Unique_Defs_For_TNs(), Create_Vector_Load_Stores(), DB_Rename_Cond_TN_Finish(), Destroy_File_Header(), Doacross_Finish(), DRA_Finalize(), DRA_Processing(), dV_view_fb_cfg(), dV_view_fb_opt_cfg(), EBO_Finalize(), ARRAY_SUMMARY::Finalize(), LRANGE_SUB_MGR::Finalize(), Finalize_Access_Vals(), Finalize_Memory(), finish_idx_ops(), Fiss_Gather_Loop(), Fission_Finish(), Fix_LRA_Blues(), Free_Dominators_Memory(), free_pu_cg_resources(), Fusion_Finish(), GCM_Schedule_Region(), GRA_LIVE_Finalize_Memory(), HoistIf_Phase(), Inliner(), Inner_Fission(), ipa_driver(), IPA_Preopt_Finalize(), Is_Vectorizable_Loop(), Lego_File_Fini(), Lnoptimizer(), LWN_Process_FF_Pragmas(), Olimit_Region_Insertion(), Optimize_Copy_Usage(), Outer_Loop_Fusion_Phase(), Padding_Analysis(), Perform_Global_Schedule(), Perform_Interprocedural_Analysis(), Perform_Loop_Invariant_Code_Motion(), Perform_Loop_Optimizations(), Perform_Read_Write_Removal(), Prompf_Finish(), REGION_init(), CG_BROWSER::Sdebug(), SHACKLE_Phase(), Simd_Phase(), Stride_Region(), SWP_Bundle(), IPA_NODE::Un_Read_PU(), Vintrinsic_Fission_Phase(), W2C_Fini(), W2F_Fini(), WN_Annotate(), WN_Instrument(), Write_inline_pu(), ALIAS_MANAGER::~ALIAS_MANAGER(), CG_THR::~CG_THR(), DAG_MEM::~DAG_MEM(), DIRECTED_GRAPH16< TEDGE, TVERTEX >::~DIRECTED_GRAPH16(), FB_CFG_MEM::~FB_CFG_MEM(), GLOBAL_CYCLES_FINDER_MEM::~GLOBAL_CYCLES_FINDER_MEM(), HB_Schedule::~HB_Schedule(), IF_CONV_MEM::~IF_CONV_MEM(), INTERVAL_PROCESSOR_MEM::~INTERVAL_PROCESSOR_MEM(), LabelOpt::~LabelOpt(), OUTPUT_FUNC_START_PROFILER_MEM::~OUTPUT_FUNC_START_PROFILER_MEM(), PRDB_MEM::~PRDB_MEM(), PROFILE_MEM::~PROFILE_MEM(), REGION_LOOP_UPDATE_MEM::~REGION_LOOP_UPDATE_MEM(), REGION_TREE_MEM::~REGION_TREE_MEM(), REGIONAL_CFG_MEM::~REGIONAL_CFG_MEM(), SCC_DIRECTED_GRAPH16::~SCC_DIRECTED_GRAPH16(), SCC_FINDER_MEM::~SCC_FINDER_MEM(), SCHED_MEM::~SCHED_MEM(), SCHED_UTIL_MEM_POOL::~SCHED_UTIL_MEM_POOL(), TN_INFO_MEM::~TN_INFO_MEM(), TOPOLOGICAL_REGIONAL_CFG_ITER_MEM::~TOPOLOGICAL_REGIONAL_CFG_ITER_MEM(), WN_Verifier::~WN_Verifier(), and WOVP::~WOVP().

void MEM_POOL_FREE ( MEM_POOL pool,
void data 
)

Definition at line 1726 of file memory.c.

void MEM_POOL_Initialize_P ( MEM_POOL pool,
const char *  name,
BOOL  bzero 
)

void MEM_POOL_Pop_P ( MEM_POOL pool  ) 

Definition at line 1559 of file memory.c.

Referenced by MEM_POOL_Pop_Unfreeze_P().

void MEM_POOL_Pop_Unfreeze_P ( MEM_POOL pool  ) 

Definition at line 1705 of file memory.c.

void MEM_POOL_Push_Freeze_P ( MEM_POOL pool  ) 

Definition at line 1529 of file memory.c.

void MEM_POOL_Push_P ( MEM_POOL pool  ) 

Definition at line 1421 of file memory.c.

Referenced by MEM_POOL_Push_Freeze_P().

MEM_PTR MEM_POOL_Realloc_P ( MEM_POOL pool,
MEM_PTR  old_block,
size_t  old_size,
size_t  new_size 
)

Definition at line 1216 of file memory.c.

INT32 MEM_POOL_Report ( MEM_POOL pool,
INT32  used_total 
)

void MEM_POOL_Set_Default ( MEM_POOL pool  ) 

static BOOL MEM_STAT_In_List ( MEM_POOL list,
MEM_POOL pool 
) [static]

Definition at line 744 of file memory.c.

References FALSE, MEM_POOL_rest, NULL, and TRUE.

Referenced by MEM_POOL_Delete(), and MEM_POOL_Initialize_P().

static INT MEM_STAT_Sort ( MEM_STAT **  as1p,
MEM_STAT **  as2p 
) [static]

Definition at line 723 of file memory.c.

References MEM_STAT_max_t.

Referenced by MEM_POOL_Report().

void MEM_Trace ( void   ) 

void MEM_Tracing_Enable ( void   ) 

static void PURIFY_OPT_Initialize ( void   )  [static]

static MEM_PTR Raw_Allocate ( MEM_POOL pool,
INT32  size 
) [static]

MEM_PTR Re_Calloc ( MEM_PTR  ptr,
INT32  new_nelem,
INT32  elsize,
INT32  old_nelem 
)

Definition at line 2208 of file memory.c.

MEM_PTR Realloc_Clear ( MEM_PTR  ptr,
INT32  new_size,
INT32  old_size 
)

Definition at line 2158 of file memory.c.

Referenced by Re_Calloc().

static void Site_Account_Alloc ( MEM_POOL pool,
size_t  old_size,
size_t  new_size 
) [static]

static void Site_Account_Pop ( MEM_POOL pool  )  [static]

static void Site_Account_Push ( MEM_POOL pool  )  [static]

void Trace_Memory_Allocation ( const INT  phase,
const char *const   pname 
)

Definition at line 949 of file memory.c.

Referenced by Check_for_Dump().


Variable Documentation

MEM_STAT* call_site_hash_tab[N_BUCKETS] [static]

Definition at line 480 of file memory.c.

Definition at line 255 of file memory.c.

Definition at line 439 of file memory.c.

Definition at line 126 of file memory.c.

Referenced by Add_Fail_TNs(), Add_MEM_Arcs(), Add_Scheduling_Notes_For_Loops(), WB_BROWSER::Ancestors(), BB_REGION_Calculate_Dominators(), BB_SET_Calculate_Dominators(), butterfly_loop_with_profile(), Calculate_Control_Dependences(), Calculate_Path_Data(), Can_Be_Tail_Call(), Can_OP_Move(), CG_Generate_Code(), CG_PU_Finalize(), CG_PU_Initialize(), Check_for_Cycles(), Check_HB_For_PQS_Suitability(), Check_QuadWord_Boundary_Absolute(), Check_Region_Recur(), Compute_Frequencies(), Copy_BB_For_Tail_Duplication(), GRA_PARA_REGION_MGR::Create(), Create_Live_BB_Sets(), CG_LOOP::EBO_After_Unrolling(), CG_LOOP::EBO_Before_Unrolling(), EBO_Finish(), EBO_Post_Process_Region(), EBO_Start(), EMT_Emit_PU(), Enumerate_Paths(), Estimate_Callee_Saves(), GRA_PARA_REGION_MGR::Finalize(), Finalize_Compute_BB_Frequencies(), Finalize_Memory(), Find_BB_TNs(), Find_Candicate_OP(), Fix_LRA_Blues(), Force_If_Convert(), Form_General_Region(), Form_Hyperblocks(), Freq_Order_Blocks(), GCM_Fill_Branch_Delay_Slots(), GCM_For_Loop(), generate_loop_butterfly_zones(), Get_Freq_Data_For_BB(), Get_Local_TN_For_Global(), GRA_LIVE_Rename_TNs(), Handle_All_Hazards(), HB_Block_Select(), HB_Form_Hyperblocks(), HB_Identify_General_Candidates(), HB_Identify_Hammock_Candidates(), HB_If_Convert(), HB_Remove_Deleted_Blocks(), IGLS_Schedule_Region(), GRA_PARA_REGION_MGR::Initialize(), Initialize_Compute_BB_Frequencies(), Initialize_Freq_Edges(), Initialize_Memory(), initialize_region_stack(), Inliner(), Insert_Predicates(), Insert_Spills_Of_Globals(), IPA_Preoptimize(), Ipl_Processing(), IPO_Process_node(), IR_reader_finish(), IR_reader_init(), mark_prolog_epilog_bbs(), Normalize_BB_Frequencies(), OP_To_Move(), WB_BROWSER::Parent(), Path_Resources_Available(), Perform_Global_Optimization(), Perform_Loop_Nest_Optimization(), Perform_Post_GCM_Steps(), Perform_Preopt_Optimization(), Perform_SWP(), Print_Prompf_Preopt_Transaction_Log(), region_stack_push(), remove_prolog_or_epilog_bbs(), Rename_TNs_For_BB(), Replace_Size16_Instr(), Schedule_BB_For_GCM(), Select_Blocks(), SL1_patch(), SNL_Change_Reduction_Loop_Stmts(), Split_BB(), OPT_PU_POINTS_TO_SUMMARIZER::Summarize_points_to(), Update_GRA_Live_Sets(), CFG::Verify_cfg(), verify_flow_graph(), DU_MANAGER::Verify_wn_in_tree(), Visit_BB_Preds(), WB_ancestors(), and WB_parent().

Initial value:

 
{
    "memory overhead",
    &overhead_blocks,
    NULL,
    NULL,
    TRUE,
    FALSE,
    MAGIC_NUM,
    NULL
}

Definition at line 447 of file memory.c.

Definition at line 148 of file memory.c.

Referenced by Perform_Interprocedural_Analysis().

Definition at line 134 of file memory.c.

Definition at line 146 of file memory.c.

BOOL mem_tracing_enabled = FALSE [static]

Definition at line 443 of file memory.c.

BOOL purify_pools = FALSE

BOOL purify_pools_trace = FALSE [static]

BOOL purify_pools_trace_x = FALSE [static]

int redzone_size = 0 [static]

Definition at line 90 of file memory.c.

Referenced by MEM_POOL_Initialize_P().

Definition at line 461 of file memory.c.


Generated on Wed Apr 8 14:43:19 2009 for Open64 by  doxygen 1.5.6