Open64 (mfef90, whirl2f, and IR tools)
TAG: version-openad; SVN changeset: 916
|
#include <sys/types.h>
#include <stdlib.h>
#include <string.h>
#include "defs.h"
#include "mempool.h"
#include "tracing.h"
#include "erglob.h"
Go to the source code of this file.
#define BLOCK_SIZE 0x2000 |
Definition at line 57 of file memory.c.
Referenced by Allocate_Block().
#define INT_LIST_first | ( | x | ) | ((x)->first) |
Definition at line 204 of file memory.c.
Referenced by Site_Account_Pop(), and Site_Account_Push().
#define INT_LIST_rest | ( | x | ) | ((x)->rest) |
Definition at line 205 of file memory.c.
Referenced by Site_Account_Pop(), and Site_Account_Push().
#define MAGIC_NUM 0xabcd |
Definition at line 367 of file memory.c.
Referenced by MEM_POOL_Alloc_P(), MEM_POOL_Delete(), MEM_POOL_FREE(), MEM_POOL_Initialize_P(), MEM_POOL_Pop_P(), MEM_POOL_Pop_Unfreeze_P(), MEM_POOL_Push_Freeze_P(), MEM_POOL_Push_P(), MEM_POOL_Realloc_P(), and MEM_POOL_Report().
#define MEM_BLOCK_avail | ( | x | ) | ((x)->avail) |
Definition at line 123 of file memory.c.
Referenced by Allocate_Block(), MEM_POOL_Pop_P(), MEM_POOL_Push_P(), and Raw_Allocate().
#define MEM_BLOCK_first_ptr | ( | x | ) | (MEM_PTR) (((char *) (x)) + PAD_TO_ALIGN(sizeof(MEM_BLOCK))) |
Definition at line 127 of file memory.c.
Referenced by Allocate_Block(), and MEM_POOL_Pop_P().
#define MEM_BLOCK_ptr | ( | x | ) | ((x)->ptr) |
Definition at line 124 of file memory.c.
Referenced by Allocate_Block(), MEM_POOL_Pop_P(), MEM_POOL_Push_P(), and Raw_Allocate().
#define MEM_BLOCK_rest | ( | x | ) | ((x)->rest) |
Definition at line 125 of file memory.c.
Referenced by Allocate_Block(), and MEM_POOL_Pop_P().
#define MEM_LARGE_BLOCK_base | ( | x | ) | ((x)->base) |
Definition at line 145 of file memory.c.
Referenced by Allocate_Large_Block(), MEM_LARGE_BLOCK_realloc(), MEM_LARGE_BLOCK_zap(), MEM_POOL_FREE(), and MEM_POOL_Realloc_P().
#define MEM_LARGE_BLOCK_next | ( | x | ) | ((x)->next) |
Definition at line 143 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 147 of file memory.c.
Referenced by Allocate_Large_Block(), MEM_POOL_FREE(), and MEM_POOL_Realloc_P().
#define MEM_LARGE_BLOCK_prev | ( | x | ) | ((x)->prev) |
Definition at line 144 of file memory.c.
Referenced by Allocate_Large_Block(), MEM_POOL_FREE(), and MEM_POOL_Realloc_P().
#define MEM_LARGE_BLOCK_ptr | ( | x | ) | ((x)->ptr) |
Definition at line 146 of file memory.c.
Referenced by Allocate_Large_Block(), MEM_LARGE_BLOCK_realloc(), MEM_LARGE_BLOCK_zap(), MEM_POOL_FREE(), and MEM_POOL_Realloc_P().
#define MEM_POOL_alloc_site_list | ( | x | ) | ((x)->alloc_site_list) |
Definition at line 379 of file memory.c.
Referenced by MEM_POOL_Initialize_P(), MEM_POOL_Report(), Site_Account_Alloc(), Site_Account_Pop(), and Site_Account_Push().
#define MEM_POOL_block | ( | x | ) | MEM_POOL_BLOCKS_block(MEM_POOL_blocks(x)) |
Definition at line 381 of file memory.c.
Referenced by Allocate_Block(), and Raw_Allocate().
#define MEM_POOL_blocks | ( | x | ) | ((x)->blocks) |
Definition at line 373 of file memory.c.
Referenced by Allocate_Large_Block(), MEM_POOL_Alloc_P(), MEM_POOL_Delete(), MEM_POOL_FREE(), MEM_POOL_Initialize_P(), MEM_POOL_Pop_P(), MEM_POOL_Push_P(), and MEM_POOL_Realloc_P().
#define MEM_POOL_BLOCKS_base_avail | ( | x | ) | ((x)->base_avail) |
Definition at line 305 of file memory.c.
Referenced by MEM_POOL_Pop_P(), and MEM_POOL_Push_P().
#define MEM_POOL_BLOCKS_base_block | ( | x | ) | ((x)->base_block) |
Definition at line 303 of file memory.c.
Referenced by MEM_POOL_Pop_P(), and MEM_POOL_Push_P().
#define MEM_POOL_BLOCKS_base_ptr | ( | x | ) | ((x)->base_ptr) |
Definition at line 304 of file memory.c.
Referenced by MEM_POOL_Pop_P(), and MEM_POOL_Push_P().
#define MEM_POOL_BLOCKS_block | ( | x | ) | ((x)->block) |
Definition at line 301 of file memory.c.
Referenced by MEM_POOL_Pop_P(), and MEM_POOL_Push_P().
#define MEM_POOL_BLOCKS_large_block | ( | x | ) | ((x)->large_block) |
Definition at line 302 of file memory.c.
Referenced by MEM_POOL_Pop_P(), and MEM_POOL_Push_P().
#define MEM_POOL_BLOCKS_rest | ( | x | ) | ((x)->rest) |
Definition at line 306 of file memory.c.
Referenced by MEM_POOL_Delete(), MEM_POOL_Pop_P(), and MEM_POOL_Push_P().
#define MEM_POOL_bz | ( | x | ) | ((x)->bz) |
Definition at line 374 of file memory.c.
Referenced by Allocate_Block(), Allocate_Large_Block(), MEM_POOL_Initialize_P(), MEM_POOL_Pop_P(), and MEM_POOL_Realloc_P().
#define MEM_POOL_frozen | ( | x | ) | ((x)->frozen) |
Definition at line 377 of file memory.c.
Referenced by MEM_POOL_Initialize_P(), MEM_POOL_Pop_P(), MEM_POOL_Pop_Unfreeze_P(), MEM_POOL_Push_Freeze_P(), and MEM_POOL_Push_P().
#define MEM_POOL_INIT_IN_PROGRESS (-1) |
Definition at line 50 of file memory.c.
Referenced by MEM_POOL_Initialize_P(), and MEM_POOL_Push_P().
#define MEM_POOL_large_block | ( | x | ) | MEM_POOL_BLOCKS_large_block(MEM_POOL_blocks(x)) |
Definition at line 383 of file memory.c.
Referenced by Allocate_Large_Block(), MEM_POOL_FREE(), and MEM_POOL_Realloc_P().
#define MEM_POOL_last_alloc | ( | x | ) | MEM_PURE_STACK_last_alloc(MEM_POOL_pure_stack(x)) |
Definition at line 359 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 | ) | ((x)->magic_num) |
Definition at line 378 of file memory.c.
Referenced by MEM_POOL_Alloc_P(), MEM_POOL_Delete(), MEM_POOL_FREE(), MEM_POOL_Initialize_P(), MEM_POOL_Pop_P(), MEM_POOL_Pop_Unfreeze_P(), MEM_POOL_Push_Freeze_P(), MEM_POOL_Push_P(), MEM_POOL_Realloc_P(), and MEM_POOL_Report().
#define MEM_POOL_name | ( | x | ) | ((x)->name) |
Definition at line 372 of file memory.c.
Referenced by Allocate_Block(), MEM_POOL_Alloc_P(), MEM_POOL_Delete(), MEM_POOL_FREE(), MEM_POOL_Initialize_P(), MEM_POOL_Pop_P(), MEM_POOL_Pop_Unfreeze_P(), MEM_POOL_Push_Freeze_P(), MEM_POOL_Push_P(), MEM_POOL_Realloc_P(), MEM_POOL_Report(), and trace_initialized_pool().
#define MEM_POOL_prev_stack | ( | x | ) | MEM_PURE_STACK_prev_stack(MEM_POOL_pure_stack(x)) |
Definition at line 361 of file memory.c.
Referenced by MEM_POOL_Pop_P().
#define MEM_POOL_pure_stack | ( | x | ) | ((x)->pure_stack) |
Definition at line 376 of file memory.c.
Referenced by MEM_POOL_Alloc_P(), MEM_POOL_Delete(), MEM_POOL_FREE(), MEM_POOL_Initialize_P(), MEM_POOL_Pop_P(), MEM_POOL_Push_P(), and MEM_POOL_Realloc_P().
#define MEM_POOL_rest | ( | x | ) | ((x)->rest) |
Definition at line 375 of file memory.c.
Referenced by MEM_POOL_Delete(), MEM_POOL_Initialize_P(), MEM_STAT_In_List(), MEM_Trace(), and trace_initialized_pool().
#define MEM_PURE_STACK_last_alloc | ( | x | ) | ((x)->last_alloc) |
Definition at line 357 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 | ) | ((x)->prev_stack) |
Definition at line 358 of file memory.c.
Referenced by MEM_POOL_FREE(), MEM_POOL_Push_P(), and MEM_POOL_Realloc_P().
#define MEM_STAT_count | ( | x | ) | ((x)->count) |
Definition at line 269 of file memory.c.
Referenced by MEM_POOL_Report(), and Site_Account_Alloc().
#define MEM_STAT_current | ( | x | ) | ((x)->current) |
Definition at line 263 of file memory.c.
Referenced by MEM_POOL_Report(), Site_Account_Alloc(), Site_Account_Pop(), and Site_Account_Push().
#define MEM_STAT_file | ( | x | ) | ((x)->file) |
Definition at line 260 of file memory.c.
Referenced by Hash_Get(), MEM_POOL_Report(), and Site_Account_Alloc().
#define MEM_STAT_hash_list_rest | ( | x | ) | ((x)->hash_list_rest) |
Definition at line 270 of file memory.c.
Referenced by Hash_Get(), and Site_Account_Alloc().
#define MEM_STAT_last | ( | x | ) | ((x)->last) |
Definition at line 266 of file memory.c.
Referenced by Site_Account_Alloc().
#define MEM_STAT_last_grew | ( | x | ) | ((x)->last_grew) |
Definition at line 267 of file memory.c.
Referenced by MEM_POOL_Report(), and Site_Account_Alloc().
#define MEM_STAT_last_shrank | ( | x | ) | ((x)->last_shrank) |
Definition at line 268 of file memory.c.
Referenced by MEM_POOL_Report(), and Site_Account_Alloc().
#define MEM_STAT_line | ( | x | ) | ((x)->line) |
Definition at line 261 of file memory.c.
Referenced by Hash_Get(), MEM_POOL_Report(), and Site_Account_Alloc().
#define MEM_STAT_max_s | ( | x | ) | ((x)->max_s) |
Definition at line 265 of file memory.c.
Referenced by MEM_POOL_Report(), and Site_Account_Alloc().
#define MEM_STAT_max_t | ( | x | ) | ((x)->max_t) |
Definition at line 264 of file memory.c.
Referenced by MEM_POOL_Report(), MEM_STAT_Sort(), and Site_Account_Alloc().
#define MEM_STAT_pool | ( | x | ) | ((x)->pool) |
Definition at line 273 of file memory.c.
Referenced by Hash_Get(), and Site_Account_Alloc().
#define MEM_STAT_pool_list_rest | ( | x | ) | ((x)->pool_list_rest) |
Definition at line 271 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 | ) | ((x)->saved_current) |
Definition at line 272 of file memory.c.
Referenced by Site_Account_Pop(), and Site_Account_Push().
#define MEM_STAT_total | ( | x | ) | ((x)->total) |
Definition at line 262 of file memory.c.
Referenced by MEM_POOL_Report(), and Site_Account_Alloc().
#define MIN_LARGE_BLOCK_SIZE 0x800 |
Definition at line 62 of file memory.c.
Referenced by MEM_POOL_Realloc_P(), and Raw_Allocate().
#define PAD_TO_ALIGN | ( | size | ) | (((size) + 7) & (~0U << 3)) |
Definition at line 416 of file memory.c.
Referenced by Allocate_Block(), MEM_POOL_Alloc_P(), and MEM_POOL_Realloc_P().
#define ZAP_ON_FREE (1) |
typedef struct mem_large_block MEM_LARGE_BLOCK |
static MEM_PTR Allocate_Block | ( | MEM_POOL * | pool | ) | [static] |
Definition at line 948 of file memory.c.
References block, BLOCK_SIZE, EC_No_Mem, ErrMsg(), fprintf(), MEM_BLOCK_avail, MEM_BLOCK_first_ptr, MEM_BLOCK_ptr, MEM_BLOCK_rest, MEM_POOL_block, MEM_POOL_bz, MEM_POOL_name, NULL, PAD_TO_ALIGN, and TFile.
Referenced by Raw_Allocate().
static MEM_PTR Allocate_Large_Block | ( | MEM_POOL * | pool, |
INT32 | size | ||
) | [static] |
Definition at line 998 of file memory.c.
References block, EC_No_Mem, ErrMsg(), MEM_LARGE_BLOCK_base, MEM_LARGE_BLOCK_next, MEM_LARGE_BLOCK_OVERHEAD, MEM_LARGE_BLOCK_prev, MEM_LARGE_BLOCK_ptr, MEM_POOL_blocks, MEM_POOL_bz, MEM_POOL_large_block, and NULL.
Referenced by Raw_Allocate().
static INT32 Field_Size | ( | INT32 | i | ) | [static] |
Definition at line 645 of file memory.c.
Referenced by MEM_POOL_Report().
Definition at line 447 of file memory.c.
References N_BUCKETS, and result.
Referenced by ID_MAP< NODE_TYPE, KEY_TYPE >::Delete(), ID_MAP< NODE_TYPE, KEY_TYPE >::Enlarge(), ID_MAP< NODE_TYPE, KEY_TYPE >::Entry_lookup(), ID_MAP< NODE_TYPE, KEY_TYPE >::Insert(), ID_MAP< NODE_TYPE, KEY_TYPE >::Print(), and Site_Account_Alloc().
Definition at line 479 of file memory.c.
References MEM_STAT_file, MEM_STAT_hash_list_rest, MEM_STAT_line, MEM_STAT_pool, NULL, and pool.
Referenced by Site_Account_Alloc().
void MEM_Initialize | ( | void | ) |
Definition at line 1861 of file memory.c.
References DevWarn(), FALSE, getenv(), MEM_POOL_Initialize, MEM_POOL_Push, purify_pools, purify_pools_trace, purify_pools_trace_x, and TRUE.
Referenced by main(), and sgi_cmd_line().
static void MEM_LARGE_BLOCK_free | ( | MEM_LARGE_BLOCK * | block | ) | [static] |
Definition at line 168 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] |
Definition at line 175 of file memory.c.
References MEM_LARGE_BLOCK_base, MEM_LARGE_BLOCK_ptr, MEM_LARGE_BLOCK_zap(), new_block(), and NULL.
Referenced by MEM_POOL_Realloc_P().
static void MEM_LARGE_BLOCK_zap | ( | MEM_LARGE_BLOCK * | block | ) | [static] |
Definition at line 161 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 | ||
) |
Definition at line 1082 of file memory.c.
References Default_Mem_Pool, DevWarn(), EC_No_Mem, ErrMsg(), Is_True, MAGIC_NUM, Malloc_Mem_Pool, MEM_POOL_blocks, MEM_POOL_last_alloc, MEM_POOL_magic_num, MEM_POOL_name, MEM_POOL_pure_stack, mem_tracing_enabled, NULL, PAD_TO_ALIGN, purify_pools, purify_pools_trace, Raw_Allocate(), Site_Account_Alloc(), size, The_Default_Mem_Pool, and TRUE.
Referenced by operator new().
void MEM_POOL_Delete | ( | MEM_POOL * | pool | ) |
Definition at line 1697 of file memory.c.
References Default_Mem_Pool, DevWarn(), free_mem_pool_blocks_list, initialized_pools, Is_True, MAGIC_NUM, Malloc_Mem_Pool, MEM_POOL_blocks, MEM_POOL_BLOCKS_rest, MEM_POOL_magic_num, MEM_POOL_name, MEM_POOL_Pop, MEM_POOL_pure_stack, MEM_POOL_rest, MEM_STAT_In_List(), mem_tracing_enabled, NULL, purify_pools, purify_pools_trace_x, and The_Default_Mem_Pool.
Referenced by Anl_Fini(), Anl_Static_Analysis(), BE_symtab_free_be_scopes(), DRA_Finalize(), DRA_Processing(), ARRAY_SUMMARY::Finalize(), W2C_Fini(), W2F_Fini(), FB_CFG_MEM::~FB_CFG_MEM(), and WN_Verifier::~WN_Verifier().
void MEM_POOL_FREE | ( | MEM_POOL * | pool, |
void * | data | ||
) |
Definition at line 1605 of file memory.c.
References Default_Mem_Pool, FALSE, FmtAssert, free(), Is_True, MAGIC_NUM, Malloc_Mem_Pool, MEM_LARGE_BLOCK_base, MEM_LARGE_BLOCK_free(), MEM_LARGE_BLOCK_next, MEM_LARGE_BLOCK_OVERHEAD, MEM_LARGE_BLOCK_prev, MEM_LARGE_BLOCK_ptr, MEM_POOL_blocks, MEM_POOL_large_block, MEM_POOL_magic_num, MEM_POOL_name, MEM_POOL_pure_stack, MEM_PURE_STACK_last_alloc, MEM_PURE_STACK_prev_stack, next, NULL, purify_pools, purify_pools_trace, The_Default_Mem_Pool, and TRUE.
void MEM_POOL_Initialize_P | ( | MEM_POOL * | pool, |
const char * | name, | ||
BOOL | memzero | ||
) |
Definition at line 1798 of file memory.c.
References Default_Mem_Pool, FALSE, initialized_pools, Is_True, MAGIC_NUM, Malloc_Mem_Pool, MEM_POOL_alloc_site_list, MEM_POOL_blocks, MEM_POOL_bz, MEM_POOL_frozen, MEM_POOL_INIT_IN_PROGRESS, MEM_POOL_magic_num, MEM_POOL_name, MEM_POOL_pure_stack, MEM_POOL_Push, MEM_POOL_rest, MEM_STAT_In_List(), mem_tracing_enabled, name, NULL, pool, purify_pools, purify_pools_trace_x, and The_Default_Mem_Pool.
void MEM_POOL_Pop_P | ( | MEM_POOL * | pool | ) |
Definition at line 1469 of file memory.c.
References Default_Mem_Pool, FALSE, FmtAssert, fprintf(), free(), free_mem_pool_blocks_list, Is_True, MAGIC_NUM, Malloc_Mem_Pool, MEM_BLOCK_avail, MEM_BLOCK_first_ptr, MEM_BLOCK_ptr, MEM_BLOCK_rest, MEM_LARGE_BLOCK_free(), MEM_LARGE_BLOCK_next, MEM_POOL_blocks, MEM_POOL_BLOCKS_base_avail, MEM_POOL_BLOCKS_base_block, MEM_POOL_BLOCKS_base_ptr, MEM_POOL_BLOCKS_block, MEM_POOL_BLOCKS_large_block, MEM_POOL_BLOCKS_rest, MEM_POOL_bz, MEM_POOL_frozen, MEM_POOL_last_alloc, MEM_POOL_magic_num, MEM_POOL_name, MEM_POOL_prev_stack, MEM_POOL_pure_stack, mem_tracing_enabled, next, NULL, purify_pools, purify_pools_trace, purify_pools_trace_x, Site_Account_Pop(), TFile, and The_Default_Mem_Pool.
Referenced by MEM_POOL_Pop_Unfreeze_P().
void MEM_POOL_Pop_Unfreeze_P | ( | MEM_POOL * | pool | ) |
Definition at line 1584 of file memory.c.
References FALSE, FmtAssert, Is_True, MAGIC_NUM, MEM_POOL_frozen, MEM_POOL_magic_num, MEM_POOL_name, MEM_POOL_Pop_P(), purify_pools_trace_x, and TRUE.
void MEM_POOL_Push_Freeze_P | ( | MEM_POOL * | pool | ) |
Definition at line 1439 of file memory.c.
References FALSE, FmtAssert, Is_True, MAGIC_NUM, MEM_POOL_frozen, MEM_POOL_magic_num, MEM_POOL_name, MEM_POOL_Push_P(), purify_pools_trace_x, and TRUE.
void MEM_POOL_Push_P | ( | MEM_POOL * | pool | ) |
Definition at line 1343 of file memory.c.
References Default_Mem_Pool, FALSE, FmtAssert, free_mem_pool_blocks_list, Is_True, MAGIC_NUM, Malloc_Mem_Pool, MEM_BLOCK_avail, MEM_BLOCK_ptr, MEM_POOL_blocks, MEM_POOL_BLOCKS_base_avail, MEM_POOL_BLOCKS_base_block, MEM_POOL_BLOCKS_base_ptr, MEM_POOL_BLOCKS_block, MEM_POOL_BLOCKS_large_block, MEM_POOL_BLOCKS_rest, MEM_POOL_frozen, MEM_POOL_INIT_IN_PROGRESS, MEM_POOL_magic_num, MEM_POOL_name, MEM_POOL_pure_stack, MEM_PURE_STACK_last_alloc, MEM_PURE_STACK_prev_stack, mem_tracing_enabled, NULL, pool, purify_pools, purify_pools_trace_x, Site_Account_Push(), The_Default_Mem_Pool, TRUE, and TYPE_MEM_POOL_ALLOC.
Referenced by MEM_POOL_Push_Freeze_P().
Definition at line 1153 of file memory.c.
References Default_Mem_Pool, DevWarn(), EC_No_Mem, ErrMsg(), FALSE, FmtAssert, Is_True, MAGIC_NUM, Malloc_Mem_Pool, MEM_LARGE_BLOCK_base, MEM_LARGE_BLOCK_next, MEM_LARGE_BLOCK_OVERHEAD, MEM_LARGE_BLOCK_prev, MEM_LARGE_BLOCK_ptr, MEM_LARGE_BLOCK_realloc(), MEM_POOL_blocks, MEM_POOL_bz, MEM_POOL_FREE, MEM_POOL_large_block, MEM_POOL_last_alloc, MEM_POOL_magic_num, MEM_POOL_name, MEM_POOL_pure_stack, MEM_PURE_STACK_last_alloc, MEM_PURE_STACK_prev_stack, mem_tracing_enabled, MIN_LARGE_BLOCK_SIZE, NULL, PAD_TO_ALIGN, purify_pools, purify_pools_trace, Raw_Allocate(), result, Site_Account_Alloc(), The_Default_Mem_Pool, and TRUE.
INT32 MEM_POOL_Report | ( | MEM_POOL * | pool, |
INT32 | used_total | ||
) |
Definition at line 724 of file memory.c.
References Field_Size(), fprintf(), Is_True, MAGIC_NUM, Max(), MEM_POOL_alloc_site_list, MEM_POOL_magic_num, MEM_POOL_name, MEM_POOL_Pop, MEM_POOL_Push, MEM_STAT_count, MEM_STAT_current, MEM_STAT_file, MEM_STAT_last_grew, MEM_STAT_last_shrank, MEM_STAT_line, MEM_STAT_max_s, MEM_STAT_max_t, MEM_STAT_pool_list_rest, MEM_STAT_Sort(), MEM_STAT_total, NULL, TFile, and TYPE_MEM_POOL_ALLOC_N.
Referenced by MEM_Trace().
void MEM_POOL_Set_Default | ( | MEM_POOL * | pool | ) |
Definition at line 1600 of file memory.c.
References pool.
Referenced by BINARY_TREE< BINARY_NODE >::~BINARY_TREE().
static BOOL MEM_STAT_In_List | ( | MEM_POOL * | list, |
MEM_POOL * | pool | ||
) | [static] |
Definition at line 695 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 674 of file memory.c.
References MEM_STAT_max_t.
Referenced by MEM_POOL_Report().
void MEM_Trace | ( | void | ) |
Definition at line 852 of file memory.c.
References fprintf(), MEM_POOL_Report(), MEM_POOL_rest, NULL, pool, and TFile.
Referenced by Ipl_Processing(), main(), and Trace_Memory_Allocation().
void MEM_Tracing_Enable | ( | void | ) |
Definition at line 922 of file memory.c.
References mem_tracing_enabled, and TRUE.
Referenced by main().
static MEM_PTR Raw_Allocate | ( | MEM_POOL * | pool, |
INT32 | size | ||
) | [static] |
Definition at line 1043 of file memory.c.
References Allocate_Block(), Allocate_Large_Block(), MEM_BLOCK_avail, MEM_BLOCK_ptr, MEM_POOL_block, MIN_LARGE_BLOCK_SIZE, NULL, result, and size.
Referenced by MEM_POOL_Alloc_P(), and MEM_POOL_Realloc_P().
Definition at line 2000 of file memory.c.
References Realloc_Clear().
MEM_PTR Realloc_Clear | ( | MEM_PTR | ptr, |
INT32 | new_size, | ||
INT32 | old_size | ||
) |
static void Site_Account_Alloc | ( | MEM_POOL * | pool, |
size_t | old_size, | ||
size_t | new_size | ||
) | [static] |
Definition at line 519 of file memory.c.
References Hash(), Hash_Get(), Max(), MEM_POOL_alloc_site_list, MEM_STAT_count, MEM_STAT_current, MEM_STAT_file, MEM_STAT_hash_list_rest, MEM_STAT_last, MEM_STAT_last_grew, MEM_STAT_last_shrank, MEM_STAT_line, MEM_STAT_max_s, MEM_STAT_max_t, MEM_STAT_pool, MEM_STAT_pool_list_rest, MEM_STAT_total, NULL, pool, and size.
Referenced by MEM_POOL_Alloc_P(), and MEM_POOL_Realloc_P().
static void Site_Account_Pop | ( | MEM_POOL * | pool | ) | [static] |
Definition at line 568 of file memory.c.
References free_int_lists, INT_LIST_first, INT_LIST_rest, MEM_POOL_alloc_site_list, MEM_STAT_current, MEM_STAT_pool_list_rest, MEM_STAT_saved_current, and NULL.
Referenced by MEM_POOL_Pop_P().
static void Site_Account_Push | ( | MEM_POOL * | pool | ) | [static] |
Definition at line 608 of file memory.c.
References free_int_lists, INT_LIST_first, INT_LIST_rest, MEM_POOL_alloc_site_list, MEM_STAT_current, MEM_STAT_pool_list_rest, MEM_STAT_saved_current, NULL, and TYPE_MEM_POOL_ALLOC.
Referenced by MEM_POOL_Push_P().
static void trace_initialized_pool | ( | char * | msg, |
char * | pname | ||
) | [static] |
Definition at line 1685 of file memory.c.
References initialized_pools, MEM_POOL_name, MEM_POOL_rest, and NULL.
void Trace_Memory_Allocation | ( | const INT | phase, |
const char *const | pname | ||
) |
Definition at line 900 of file memory.c.
References DBar, fprintf(), Get_Trace(), MEM_Trace(), TFile, and TKIND_ALLOC.
MEM_STAT* call_site_hash_tab[N_BUCKETS] [static] |
INT_LIST* free_int_lists [static] |
Definition at line 207 of file memory.c.
Referenced by Site_Account_Pop(), and Site_Account_Push().
MEM_POOL_BLOCKS* free_mem_pool_blocks_list [static] |
Definition at line 390 of file memory.c.
Referenced by MEM_POOL_Delete(), MEM_POOL_Pop_P(), and MEM_POOL_Push_P().
MEM_POOL* initialized_pools [static] |
Definition at line 423 of file memory.c.
Referenced by MEM_POOL_Delete(), MEM_POOL_Initialize_P(), and trace_initialized_pool().
Definition at line 97 of file memory.c.
Referenced by Write_PU_Info().
Definition at line 78 of file memory.c.
Referenced by Ipl_Processing(), and IR_reader_init().
MEM_POOL mem_overhead_pool [static] |
Definition at line 94 of file memory.c.
Referenced by OPTIONS_STACK::Pop_Current_Options(), OPTIONS_STACK::Push_Current_Options(), and Save_Cur_PU_Name().
Definition at line 99 of file memory.c.
Referenced by Do_WOPT_and_CG_with_Regions(), Ipl_Processing(), ir_b2a_process_PUs(), ir_sel(), main(), Post_Process_Backend(), Postprocess_PU(), Preprocess_PU(), process_pu(), Read_Local_Info(), and read_pu().
Definition at line 80 of file memory.c.
Referenced by Backend_Processing(), Do_WOPT_and_CG_with_Regions(), and Preprocess_PU().
Definition at line 85 of file memory.c.
Referenced by DRA_Add_Clone(), ir_b2a_process_PUs(), ir_sel(), Postprocess_PU(), and Preprocess_PU().
Definition at line 79 of file memory.c.
Referenced by DRA_Add_Clone(), DRA_Clone_Initialize(), DRA_Mangle_All(), DRA_Mangle_Call_Site(), DRA_Mangle_Entry(), Init_PU_arg_area_size_array(), main(), and Realloc_ST_formal_info().
Definition at line 84 of file memory.c.
Referenced by create_ipa_internal_name(), DST_enter_cloned_childs(), new_block(), and New_DST().
BOOL mem_tracing_enabled = FALSE [static] |
Definition at line 421 of file memory.c.
Referenced by MEM_POOL_Alloc_P(), MEM_POOL_Delete(), MEM_POOL_Initialize_P(), MEM_POOL_Pop_P(), MEM_POOL_Push_P(), MEM_POOL_Realloc_P(), and MEM_Tracing_Enable().
MEM_POOL_BLOCKS overhead_blocks [static] |
Definition at line 363 of file memory.c.
Referenced by MEM_Initialize(), MEM_POOL_Alloc_P(), MEM_POOL_Delete(), MEM_POOL_FREE(), MEM_POOL_Initialize_P(), MEM_POOL_Pop_P(), MEM_POOL_Push_P(), and MEM_POOL_Realloc_P().
BOOL purify_pools_trace = FALSE [static] |
Definition at line 364 of file memory.c.
Referenced by MEM_Initialize(), MEM_POOL_Alloc_P(), MEM_POOL_FREE(), MEM_POOL_Pop_P(), and MEM_POOL_Realloc_P().
BOOL purify_pools_trace_x = FALSE [static] |
Definition at line 365 of file memory.c.
Referenced by MEM_Initialize(), MEM_POOL_Delete(), MEM_POOL_Initialize_P(), MEM_POOL_Pop_P(), MEM_POOL_Pop_Unfreeze_P(), MEM_POOL_Push_Freeze_P(), and MEM_POOL_Push_P().
const char* special_address = NULL |
const char* special_address_owner = "NOBODY" |
MEM_POOL* The_Default_Mem_Pool [static] |
Definition at line 412 of file memory.c.
Referenced by MEM_POOL_Alloc_P(), MEM_POOL_Delete(), MEM_POOL_FREE(), MEM_POOL_Initialize_P(), MEM_POOL_Pop_P(), MEM_POOL_Push_P(), and MEM_POOL_Realloc_P().