#include "mempool.h"

Go to the source code of this file.
Defines | |
| #define | CXX_USE_STANDARD_NEW_AND_DELETE |
| #define | CXX_NEW(constructor, mempool) (new constructor) |
| #define | CXX_NEW_ARRAY(constructor, elements, mempool) (new constructor[elements]) |
| #define | CXX_DELETE(pointer, mempool) (delete pointer) |
| #define | CXX_DELETE_ARRAY(pointer, mempool) (delete[] pointer) |
Definition at line 135 of file cxx_memory.h.
Referenced by Anl_Fini(), Anl_Static_Analysis(), PROJECTED_REGION::Compare(), cwh_auxst_un_register_table(), Delete_Scope(), DRA_Finalize(), DRA_Processing(), dV_view_whirl(), ANL_FUNC_ENTRY::Emit_Dir_Entries(), emit_inits_for_symbol(), ANL_FUNC_ENTRY::Emit_Nested_Original_Constructs(), ANL_FUNC_ENTRY::Emit_Original_Construct(), HASH_TABLE< SIG_TYPE, DATA_TYPE >::Remove(), IPO_ADDR_HASH::Reset_Lookup(), Stab_finalize_flags(), ANL_FUNC_ENTRY::~ANL_FUNC_ENTRY(), ANL_VARLIST::~ANL_VARLIST(), BINARY_TREE< BINARY_NODE >::~BINARY_TREE(), BINARY_TREE_NODE< BINARY_NODE >::~BINARY_TREE_NODE(), DIRECTED_GRAPH16< ARRAY_EDGE16, ARRAY_VERTEX16 >::~DIRECTED_GRAPH16(), GOTO_TABLE::~GOTO_TABLE(), HASH_TABLE< ST *, ST * >::~HASH_TABLE(), and USER_HASH_TABLE< KEY_TYPE, DATA_TYPE, HASH_FUNC, KEY_EQ >::~USER_HASH_TABLE().
Definition at line 138 of file cxx_memory.h.
Referenced by BE_symtab_alloc_scope_level(), DRA_Set_Write_Location(), OPTIONS_STACK::Pop_Current_Options(), ANL_CBUF::Write_Char(), ANL_CBUF::Write_String(), ANL_CBUF::~ANL_CBUF(), HASH_TABLE< ST *, ST * >::~HASH_TABLE(), USER_HASH_TABLE< KEY_TYPE, DATA_TYPE, HASH_FUNC, KEY_EQ >::~USER_HASH_TABLE(), W2CF_TRANSLATOR::~W2CF_TRANSLATOR(), and W2FC_FLAG_ARRAY::~W2FC_FLAG_ARRAY().
| #define CXX_NEW | ( | constructor, | |||
| mempool | ) | (new constructor) |
Definition at line 129 of file cxx_memory.h.
Referenced by Anl_Init(), Anl_Static_Analysis(), BE_symtab_alloc_scope_level(), LOOPINFO::Build_linex(), PROMPF_INFO::Cache_Tile(), PROMPF_INFO::Cache_Winddown(), CFG_NODE_INFO::CFG_NODE_INFO(), PROJECTED_REGION::Compare(), PROJECTED_NODE::Copy(), create_ipa_internal_name(), LOOPINFO::Create_linex(), PROJECTED_NODE::Create_linex(), cwh_auxst_register_table(), DIRECTED_GRAPH16< EDGE_TYPE, VERTEX_TYPE >::DIRECTED_GRAPH16(), PROMPF_INFO::Distribution(), PROMPF_INFO::Doacross_Inner_Tile(), PROMPF_INFO::Doacross_Outer_Tile(), PROMPF_INFO::Doacross_Sync(), PROMPF_INFO::Donest_Middle_Tile(), PROMPF_INFO::Donest_Outer_Tile(), DRA_Add_Clone(), DRA_Clone_Initialize(), DRA_Initialize(), DRA_Mangle_All(), DRA_Mangle_Call_Site(), DRA_Mangle_Entry(), DRA_Process_Requests(), DRA_Processing(), PROMPF_INFO::Dsm_Io(), PROMPF_INFO::Dsm_Local(), PROMPF_INFO::Dsm_Tile(), dV_view_whirl(), PROMPF_INFO::Elimination(), ANL_FUNC_ENTRY::Emit_Nested_Original_Constructs(), USER_HASH_TABLE< KEY_TYPE, DATA_TYPE, HASH_FUNC, KEY_EQ >::Enter(), HASH_TABLE< ST *, ST * >::Enter(), BINARY_TREE< BINARY_NODE >::Enter(), BINARY_TREE_NODE< BINARY_NODE >::Enter(), HASH_TABLE< SIG_TYPE, DATA_TYPE >::Enter_If_Unique(), PROMPF_INFO::F90_Array_Stmt(), fei_static_base(), ANL_VARLIST::Find_or_Insert(), PROMPF_INFO::Fission(), PROMPF_INFO::Fusion(), PROMPF_INFO::Gather_Scatter(), PROMPF_INFO::General_Version(), Get_Original_Type(), PROMPF_INFO::Hoist_Messy_Bounds(), PROJECTED_NODE::Init(), ARRAY_SUMMARY::Init(), CFG_NODE_INFO::Init(), REGION_ARRAYS::Init(), PROJECTED_KERNEL::Init(), PROMPF_INFO::Inner_Fission(), PROMPF_INFO::Inner_Shackle(), IPO_ADDR_HASH::Insert(), PROMPF_INFO::Interchange(), PROMPF_INFO::Interleaved_Winddown(), IPO_CLONE::IPO_CLONE(), IPO_SYMTAB::IPO_SYMTAB(), LOOPINFO::LOOPINFO(), main(), PROJECTED_REGION::Map_to_linex_array(), PROMPF_INFO::Mark_F90_Lower(), PROMPF_INFO::Mark_Omp(), PROMPF_INFO::Mark_Postlno(), PROMPF_INFO::Mark_Prelno(), PROMPF_INFO::Mark_Preopt(), LOOPINFO::Max_value(), PROJECTED_REGION::May_Union(), MemCtr_Add(), LINEX::Merge(), LOOPINFO::Min_value(), PROMPF_INFO::Mp_Tile(), PROMPF_INFO::Mp_Version(), New_DRA(), New_Scope(), PROMPF_INFO::OMPL_Atomic_To_Critical_Section(), PROMPF_INFO::OMPL_Atomic_To_FetchAndOp(), PROMPF_INFO::OMPL_Atomic_To_Swap(), PROMPF_INFO::OMPL_Eliminate_Section(), PROMPF_INFO::OMPL_Fetchop_Atomic(), PROMPF_INFO::OMPL_Master_To_If(), PROMPF_INFO::OMPL_Sections_To_Loop(), PROMPF_INFO::Outer_Shackle(), PROMPF_INFO::Parallel_Region(), PROMPF_INFO::Post_Peel(), PROMPF_INFO::Pre_Peel(), PROMPF_INFO::Prefetch_Version(), PROMPF_INFO::Preopt_Create(), Preprocess_PU(), Process_Fill_Align_Pragmas(), PROJECTED_KERNEL::Project(), PROJECTED_REGION::PROJECTED_REGION(), Projected_Region_From_Access_Array(), Projected_Region_From_St(), PROMPF_INFO::PROMPF_INFO(), PROMPF_INFO::Prompf_Info_Traverse(), REGION_ARRAYS::REGION_ARRAYS(), PROMPF_INFO::Register_Shutdown(), PROMPF_INFO::Register_SStrip(), PROMPF_INFO::Register_Startup(), PROMPF_INFO::Register_Tile(), PROMPF_INFO::Register_Winddown(), PROMPF_INFO::Remove_Unity_Trip(), RESHAPE::Reshape_Callee_To_Caller(), RESHAPE::Reshape_Constant_Shape(), Save_Local_Symtab(), PROMPF_INFO::Se_Cache_Tile(), PROMPF_INFO::Se_Tile(), PROJECTED_NODE::Set_constant_linexs(), PROJECTED_NODE::Set_constant_two_strided_section(), PROJECTED_REGION::Set_region(), PROJECTED_NODE::Set_to_kernel_image(), PROMPF_INFO::Single_Process(), Stab_initialize_flags(), LINEX::Subtract(), and PROMPF_INFO::Vintr_Fission().
| #define CXX_NEW_ARRAY | ( | constructor, | |||
| elements, | |||||
| mempool | ) | (new constructor[elements]) |
Definition at line 132 of file cxx_memory.h.
Referenced by ANL_CBUF::_Alloc(), Menu_info::Add(), PROMPF_TRANS::Add_Index_Name(), BE_symtab_alloc_scope_level(), PROMPF_INFO::Check(), PROJECTED_REGION::Compare(), DRA_INFO::DRA_INFO(), DRA_New_Clone_Sig(), DRA_Open_And_Map_File(), HASH_TABLE< SIG_TYPE, DATA_TYPE >::HASH_TABLE(), PROJECTED_KERNEL::Init(), ir_a2b::MapStrToEnum(), ir_a2b::MapStrToFlags(), PROJECTED_REGION::May_Union(), DaVinci::Parse_Node_Ids(), PROJECTED_KERNEL::Project(), OPTIONS_STACK::Push_Current_Options(), Menu_info::Set(), OPTIONS_STACK::str2argv(), W2CF_TRANSLATOR::W2CF_TRANSLATOR(), and W2FC_FLAG_ARRAY::W2FC_FLAG_ARRAY().
| #define CXX_USE_STANDARD_NEW_AND_DELETE |
Description:
C++ macro replacements for new and delete using memory pools. new and delete should never be used in the compiler; these should be used instead.
Exported preprocessor macro
CXX_USE_STANDARD_NEW_AND_DELETE
If this preprocessor macro is defined, then the macros below just ignore the memory pools and call the normal new and delete.
Exported functions:
CXX_NEW(constructor, MEM_POOL*)
Use CXX_NEW instead of new. E.g.
X* x = new X(3,4);
should be replaced by
X* x = CXX_NEW(X(3,4), malloc_pool);
(or whatever appropriate pool name).
CXX_NEW_ARRAY(constructor, elements, MEM_POOL*)
Use CXX_NEW_ARRAY instead of new []. E.g.
X* x = new X[a*b];
should be replaced by
X* x = CXX_NEW_ARRAY(X, a*b, malloc_pool);
(or whatever appropriate pool name).
CXX_NEW_VARIANT(constructor, pad, MEM_POOL*)
Like CXX_NEW allocates an instance of type "constructor"
but allocates "pad" amount of extra storage
Could be viewed as X* x = (X*) malloc (sizeof(X)+pad)
Followed by a call to the constructor for X.
There is no C++ equivalent. Therefore not available when using
standard new and delete.
CXX_DELETE(pointer, MEM_POOL*)
Use CXX_DELETE instead of delete. E.g.
delete p;
should be replaced by
(or whatever appropriate pool name).
CXX_DELETE_ARRAY(pointer, MEM_POOL*)
Use CXX_DELETE_ARRAY instead of delete[]. E.g.
delete[] p;
should be replaced by
CXX_DELETE_ARRAY(p, malloc_pool);
(or whatever appropriate pool name).
Definition at line 126 of file cxx_memory.h.
1.6.1