PPL Logo

Memory Allocation and Monitoring

This module provides the functions malloc, free, calloc, cfree, realloc, valloc, memalign, and other functions for determining the current and past memory usage. More...

Functions

void initialize_memory_wrapper ()
void * initialize_memory_wrapper_calloc (size_t nelem, size_t size)
void * initialize_memory_wrapper_malloc (size_t size)
void * initialize_memory_wrapper_realloc (void *ptr, size_t size)
void * initialize_memory_wrapper_memalign (size_t align, size_t size)
void * initialize_memory_wrapper_valloc (size_t size)
void initialize_memory_wrapper_free (void *ptr)
void initialize_memory_wrapper_cfree (void *ptr)
int CmiMemoryIs (int flag)
void CmiOutOfMemoryInit (void)
void CmiOutOfMemory (int nBytes)
static void * meta_malloc (size_t)
static void * meta_realloc (void *, size_t)
static void * meta_memalign (size_t, size_t)
static void meta_free (void *)
static void * meta_malloc_hook (size_t s, const void *c)
static void * meta_realloc_hook (void *p, size_t s, const void *c)
static void * meta_memalign_hook (size_t s1, size_t s2, const void *c)
static void meta_free_hook (void *p, const void *c)
static void my_init_hook (void)
void * malloc (size_t size)
void free (void *ptr)
void * calloc (size_t nelem, size_t size)
void cfree (void *ptr)
void * realloc (void *ptr, size_t size)
void * memalign (size_t align, size_t size)
void * valloc (size_t size)
void CmiMemoryInit (char **argv)
void * malloc_reentrant (size_t size)
void free_reentrant (void *mem)
int sbrk (int s)
static CMK_TYPEDEF_UINT8 MemusageMstats ()
static CMK_TYPEDEF_UINT8 MemusageSbrk ()
static CMK_TYPEDEF_UINT8 MemusageProcSelfStat ()
static CMK_TYPEDEF_UINT8 MemusageMallinfo ()
static CMK_TYPEDEF_UINT8 MemusagePS ()
static CMK_TYPEDEF_UINT8 MemusageWindows ()
static CMK_TYPEDEF_UINT8 MemusageBGP ()
CMK_TYPEDEF_UINT8 CmiMemoryUsage ()
 Return number of bytes currently allocated, if possible.
CMK_TYPEDEF_UINT8 CmiMaxMemoryUsage ()
 Return number of maximum number of bytes allocated since the last call to CmiResetMaxMemory(), if possible.
void CmiResetMaxMemory ()
 Reset the mechanism that records the highest seen (high watermark) memory usage.
CMK_TYPEDEF_UINT8 CmiMinMemoryUsage ()
void CmiResetMinMemory ()
static void meta_init (char **argv)
static void * meta_calloc (size_t nelem, size_t size)
static void meta_cfree (void *mem)
static void * meta_valloc (size_t size)
void * malloc_nomigrate (size_t size)
void free_nomigrate (void *mem)
CmiIsomallocBlockListCmiIsomallocBlockListActivate (CmiIsomallocBlockList *l)
CmiIsomallocBlockListCmiIsomallocBlockListCurrent ()
void CmiEnableIsomalloc ()
void CmiDisableIsomalloc ()
void CmiMemoryMark (void)
void CmiMemoryMarkBlock (void *blk)
void CmiMemorySweep (const char *where)
void CmiMemoryCheck (void)
void memory_preallocate_hack ()
void CpdSetInitializeMemory (int v)
size_t cpd_memory_length (void *lenParam)
 Returns the number of total blocks of memory allocated.
void cpd_memory_pup (void *itemParam, pup_er p, CpdListItemsRequest *req)
void cpd_memory_leak (void *itemParam, pup_er p, CpdListItemsRequest *req)
void check_memory_leaks (LeakSearchInfo *i)
size_t cpd_memory_getLength (void *lenParam)
void cpd_memory_get (void *itemParam, pup_er p, CpdListItemsRequest *req)
void CpdMemoryMarkClean (char *msg)
void setProtection (char *mem, char *ptr, int len, int flag)
void setMemoryTypeChare (void *ptr)
void setMemoryTypeMessage (void *ptr)
void CpdSystemEnter ()
void CpdSystemExit ()
void CpdResetMemory ()
void CpdCheckMemory ()
int get_memory_allocated_user_total ()
void * MemoryToSlot (void *ptr)
int Slot_ChareOwner (void *s)
int Slot_AllocatedSize (void *s)
int Slot_StackTrace (void *s, void ***stack)
int setMemoryChareIDFromPtr (void *ptr)
void setMemoryChareID (int id)
void setMemoryOwnedBy (void *ptr, int id)
void * CmiMallocAligned (const size_t size, const unsigned int alignment)
void CmiFreeAligned (void *ptr)

Variables

void * memory_stack_top
int cpdInSystem = 1
void *(* mm_malloc )(size_t) = initialize_memory_wrapper_malloc
void *(* mm_calloc )(size_t, size_t) = initialize_memory_wrapper_calloc
void *(* mm_realloc )(void *, size_t) = initialize_memory_wrapper_realloc
void *(* mm_memalign )(size_t, size_t) = initialize_memory_wrapper_memalign
void *(* mm_valloc )(size_t) = initialize_memory_wrapper_valloc
void(* mm_free )(void *) = initialize_memory_wrapper_free
void(* mm_cfree )(void *) = initialize_memory_wrapper_cfree
CMK_TYPEDEF_UINT8 _memory_allocated = 0
CMK_TYPEDEF_UINT8 _memory_allocated_max = 0
CMK_TYPEDEF_UINT8 _memory_allocated_min = 0
static int rank_holding_CmiMemLock = -1
static int CmiMemoryIs_flag = 0
static char * memory_lifeRaft = NULL
 memory_lifeRaft is a very small heap-allocated region.
int memory_status_info = 0
int memory_chare_id = 0
static void *(* old_malloc_hook )(size_t, const void *)
static void *(* old_realloc_hook )(void *, size_t, const void *)
static void *(* old_memalign_hook )(size_t, size_t, const void *)
static void(* old_free_hook )(void *, const void *)
void(* __malloc_initialize_hook )(void) = my_init_hook
static int MemusageInited = 0
static CMK_TYPEDEF_UINT8 MemusageInitSbrkval = 0

Detailed Description

This module provides the functions malloc, free, calloc, cfree, realloc, valloc, memalign, and other functions for determining the current and past memory usage.

There are several possible implementations provided here-- the user can link in whichever is best using the -malloc option with charmc.

The major possibilities here are empty (use the system's malloc), GNU (use malloc-gnu.c), and meta (use malloc-cache.c or malloc-paranoid.c). On machines without sbrk(), only the system's malloc is available.

The CMK_MEMORY_BUILD_* symbols come in from the compiler command line.

To determine how much memory your Charm++ program is using on a processor, call CmiMemoryUsage(). This function will return the number of bytes allocated, usually representing the heap size. It is possible that this measurement will not exactly represent the heap size, but rather will reflect the total amount of memory used by the program.


Function Documentation

void initialize_memory_wrapper (  ) 

void * initialize_memory_wrapper_calloc ( size_t  nelem,
size_t  size 
)

Definition at line 100 of file memory.c.

References initialize_memory_wrapper(), and mm_calloc.

void * initialize_memory_wrapper_malloc ( size_t  size  ) 

Definition at line 108 of file memory.c.

References initialize_memory_wrapper(), and mm_malloc.

void * initialize_memory_wrapper_realloc ( void *  ptr,
size_t  size 
)

Definition at line 116 of file memory.c.

References initialize_memory_wrapper(), and mm_realloc.

void * initialize_memory_wrapper_memalign ( size_t  align,
size_t  size 
)

Definition at line 121 of file memory.c.

References initialize_memory_wrapper(), and mm_memalign.

void * initialize_memory_wrapper_valloc ( size_t  size  ) 

Definition at line 126 of file memory.c.

References initialize_memory_wrapper(), and mm_valloc.

void initialize_memory_wrapper_free ( void *  ptr  ) 

Definition at line 131 of file memory.c.

References initialize_memory_wrapper().

void initialize_memory_wrapper_cfree ( void *  ptr  ) 

Definition at line 136 of file memory.c.

References initialize_memory_wrapper().

int CmiMemoryIs ( int  flag  ) 

void CmiOutOfMemoryInit ( void   ) 

Definition at line 750 of file memory.c.

References CmiMyRank(), memory_lifeRaft, memory_preallocate_hack(), and mm_malloc.

Referenced by CmiMemoryInit().

void CmiOutOfMemory ( int  nBytes  ) 

Definition at line 183 of file memory.c.

References CmiAbort(), CmiMemoryUsage(), free(), and memory_lifeRaft.

Referenced by meta_calloc(), meta_malloc(), meta_memalign(), and meta_valloc().

static void* meta_malloc ( size_t  size  )  [static]

Definition at line 27 of file memory-lock.c.

References CmiOutOfMemory(), and mm_malloc.

static void* meta_realloc ( void *  mem,
size_t  size 
) [static]

Definition at line 53 of file memory-lock.c.

References mm_realloc.

static void* meta_memalign ( size_t  align,
size_t  size 
) [static]

Definition at line 60 of file memory-lock.c.

References CmiOutOfMemory(), and mm_memalign.

static void meta_free ( void *  mem  )  [static]

Definition at line 35 of file memory-lock.c.

References mm_free.

static void* meta_malloc_hook ( size_t  s,
const void *  c 
) [static]

Definition at line 209 of file memory.c.

References meta_malloc().

Referenced by my_init_hook().

static void* meta_realloc_hook ( void *  p,
size_t  s,
const void *  c 
) [static]

Definition at line 210 of file memory.c.

References meta_realloc().

Referenced by my_init_hook().

static void* meta_memalign_hook ( size_t  s1,
size_t  s2,
const void *  c 
) [static]

Definition at line 211 of file memory.c.

References meta_memalign().

Referenced by my_init_hook().

static void meta_free_hook ( void *  p,
const void *  c 
) [static]

Definition at line 212 of file memory.c.

References meta_free().

Referenced by my_init_hook().

static void my_init_hook ( void   )  [static]

void * malloc ( size_t  size  ) 

Definition at line 287 of file memory.c.

References meta_malloc().

Referenced by _allocNewChare(), _futuresModuleInit(), _initCharm(), CpdList_object::add(), CpdList_objectNames::add(), add_slots(), add_to_list(), FEM_MUtil::addElemRemote(), FEM_MUtil::addGhostElementRemote(), femMeshModify::addNodeRemote(), FEM_MUtil::addToSharedList(), ADIOI_Malloc_fn(), aggregate_com_mat(), aggregate_obj_weight(), CtgGlobalStruct::allocate(), CkArray::allocate(), allocateInfiBufferPool(), AMPI_Alloc_mem(), AMPI_Alltoall(), AMPI_Reduce_scatter(), AMPI_Scan(), AmpiReducerFunc(), FEM_MUtil::AreaTest(), arg_init(), args2argv(), LBgroup::balance(), BGQTorusManager::BGQTorusManager(), build_comm(), build_cost_matrix(), build_level_topology(), build_synthetic_proc_id(), build_synthetic_topology(), build_synthetic_topology_old(), build_tree_from_topology(), FEM_MUtil::buildChunkToNodeTable(), built_pivot_tree(), bvset_enumerate(), PUP::xlater::bytes(), CcdModuleInit(), ccs_getinfo(), ccs_killport(), CcsBufferMessage(), CcsDelayReply(), CcsHandleRequest(), CcsRecvResponseMsg(), CcsSecMan_default(), CcsServer_recvRequestData(), CfutureCreate(), check_stdio_header(), ChMessage_new(), ChMessageData_recv(), CIdleTimeoutInit(), CkCreateLocalGroup(), CkCreateLocalNodeGroup(), CkPupMainChareData(), CkSequence< T >::CkSequence(), TempoArray::ckTempoReduce(), CldComputeNeighborData(), CldModuleGeneralInit(), CldStoreCharemsg(), PUP::able::clone(), CMI_VMI_CmiAlloc(), CMI_VMI_Common_Receive(), CMI_VMI_Connection_Handler(), CMI_VMI_Initialize_VMI(), CMI_VMI_Open_Connections(), CMI_VMI_RDMA_Get_Completion_Handler(), CMI_VMI_Startup_Charmrun(), CMI_VMI_Startup_CRM(), CmiCopyArgs(), CmiCreateLock(), CmiCreateNotifyCommThdMsg(), CmiCreateReceiverPersistent(), CmiDirect_assocLocalBuffer(), CmiDirect_createHandle(), CmiExtendHandlerTable(), CmiGetReductionCreate(), CmiInitCPUAffinity(), CmiInitMemAffinity(), CmiInitNotifyCommThdScheme(), CmiInitPxshm(), CmiInitSysvshm(), CmiMachineInit(), CmiMallocAligned(), CmiNotifyGetState(), CmiProbeLatencies(), CmiReductionsInit(), CmiSendMessagePxshm(), CmiSendMessageXpmem(), CmiTmpAlloc(), CmiTmpSetup(), CmmPup(), CMsgCallbacksInit(), CMsgRegisterCallback(), FEM_Adapt_Algs::Coarsen(), complete_com_mat(), complete_obj_weight(), complete_tab_node(), compressedBuffer::compressedBuffer(), redistributor2D::continueToNextStep(), ConverseInit(), CPathGetReduction(), CPathGetSingle(), CPathModuleInit(), CpdConditional_SetupComm(), CpdDebugReturnAllocationTree(), CpdDebugReturnMemStat(), Cpthread_cleanup_push(), Cpthread_create3(), Cpthread_key_create(), CQdStateCreate(), create_btree_node(), create_dumb_tree(), createah(), createBcastPool(), createHandleTable(), createLocalQps(), FuncNodeHelper::createPThreads(), createShmObjectsAndSems(), CthAllocateStack(), CthCreate(), CthCreateInner(), CthFree(), CthInit(), CthPup(), CthPupBase(), CthResume1(), CthThreadBaseInit(), CthThreadInit(), CWeb_Deliver(), CWebHandler(), CkPoolQueue< type >::dequeue(), derive_shared_nodes(), FEM_Adapt_Algs::didItFlip(), disabled_map(), display_other_heuristics(), do_load(), dupargv(), FEM_AdaptL::edge_bisect(), BulkAdapt::edge_bisect_3D(), FEM_Adapt::edge_bisect_help(), FEM_AdaptL::edge_contraction(), FEM_AdaptL::edge_contraction_help(), FEM_AdaptL::edge_flip(), FEM_Adapt::edge_flip_help(), EnqueueMsg(), expand_cblist(), expand_ccd_heap(), fast_grouping(), FEM_add_element(), FEM_purge_element(), FEM_remove_element(), FEM_remove_node_local(), FIFO_Create(), FIFO_Enumerate(), FIFO_Expand(), fillBufferPools(), find_largest_free_region(), edge::flipPrevent(), FPQueueInit(), FuncSingleHelper::FuncSingleHelper(), g_initGraph(), generate_random_sol(), generateRandomGraph(), get_comm_speed(), BulkAdapt::get_elemsToLock(), get_syms(), FEM_Adapt_Algs::getArea(), FEM_Adapt_Algs::getAreaQuality(), FEM_MUtil::getChunkNos(), getFreeRecvSlot(), getFreeSendSlot(), getInfiCmiChunk(), getInfiCmiChunkThread(), FEM_Adapt_Algs::getShortestEdge(), getXTNodeID(), GKmalloc(), group_nodes(), BulkAdapt::handle_split_3D(), infi_CmiAlloc(), init_cblist(), initAllSendQs(), SuperBlock::initBlock(), InitEdgeList(), initGraph(), initinfiAddr(), initinfiData(), initInfiOtherNodeData(), initSendQ(), initTraceCore(), InitVertices(), CkSequence< T >::Insert(), lbObjects::Insert(), insert_TraceCoreEvent(), chunk::insertLock(), sim::InternalCommitPrintf(), irecvListEntryAllocate(), chunk::joinCommLists(), KillOnAllSigs(), lbObjectNode::lbObjectNode(), lbObjects::lbObjects(), LBstrategy::LBstrategy(), FEM_Adapt_Algs::length(), list_insert(), load_symtab(), CentralLB::LoadBalance(), TraceCore::LogEvent(), MachineSpecificSendForMPI(), main(), makeQueue(), makeSet(), malloc_nomigrate(), malloc_reentrant(), map_MPIPP(), map_topology(), Matrix::Matrix(), merge(), MPICH_AlltoAll_medium(), MPICH_AlltoAll_short(), new_group_list(), new_slotset(), node_addresses_store(), PythonReplyString::operator new(), TraceEntry::operator new(), BinEntry::operator new(), LogEntry::operator new(), readonlybase::operator new(), ckcomplex::operator new[](), OtherNode_init(), PythonIterator::pack(), PythonExecute::pack(), pack(), FEM_MUtil::packEntData(), ParFUM_recreateSharedNodes(), parseInfo(), partial_sort(), pathextfix(), pathfix_append(), PCQueueCreate(), PCQueuePop(), pidtonid(), postInitialRecvs(), pparam_cell(), LBSimulation::PrintDecisions(), ComlibManager::printPeList(), printStats(), processRdmaRequest(), PipeBroadcastConverse::propagate(), RandomSequence< T >::pup(), CkSequence< T >::pup(), Boomarray< T >::pup(), CProxy::pup(), NetFEM_updatePackage::pupMallocBuf(), pushSendQ(), pvtObjects::pvtObjects(), RandomSequence< T >::RandomSequence(), memoryBuffer::reallocate(), RecursiveBiPart(), FEM_Adapt_Algs::Refine(), FEM_Adapt_Algs::refine_element_leb(), registerMultiSendMesg(), FEM_MUtil::removeNodeAll(), memoryBuffer::resize(), search_pemap(), select_independent_groups(), select_independent_groups_by_largest_index(), SendMsgBuf(), FEM_Adapt_Algs::SetMeshSize(), FEM_Adapt_Algs::SetReferenceMesh(), setupSharedBuffers(), sim::sim(), FEM_Adapt_Algs::simple_coarsen(), FEM_Adapt_Algs::simple_refine(), CentralLB::simulationRead(), CentralLB::simulationWrite(), FEM_MUtil::splitEntityAll(), FEM_MUtil::splitEntityRemote(), FEM_MUtil::StructureTest(), substr(), super_fast_grouping(), traceCommonInit(), TreeMatchMapping(), FEM_AdaptL::unlockNodes(), update_comm_speed(), edge::updateCloud(), xi::Value::Value(), FEM_AdaptL::vertex_remove(), FEM_Adapt::vertex_remove_help(), FEM_Adapt::vertex_split_help(), ZoltanLB::work(), TreeMatchLB::work(), ScotchTopoLB::work(), ScotchRefineLB::work(), ScotchLB::work(), RecBisectBfLB::work(), write_stdio_duplicate(), XT3TorusManager::XT3TorusManager(), and XTTorusManager::XTTorusManager().

void free ( void *  ptr  ) 

Definition at line 288 of file memory.c.

References meta_free().

Referenced by CpdList_arrayElements::add(), CpdList_arrayElementNames::add(), CpdList_objectNames::add(), add_slots(), AddEdges(), FEM_MUtil::addElemRemote(), FEM_MUtil::addGhostElementRemote(), femMeshModify::addNodeRemote(), FEM_MUtil::addToSharedList(), ADIO_Close(), ADIO_FileSysType_fncall(), ADIO_Open(), ADIOI_Free_fn(), ADIOI_PIOFS_SetInfo(), ADIOI_XFS_ReadContig(), ADIOI_XFS_WriteContig(), AMPI_Free_mem(), AMPI_Reduce_scatter(), AMPI_Scan(), AmpiReducerFunc(), FEM_MUtil::AreaTest(), arg_init(), AssembleMultisectedGraph(), btree_delete(), btree_delete_int(), BucketSortKeysInc(), build_level_topology(), xi::buildAtomic(), FEM_MUtil::buildChunkToNodeTable(), PUP::xlater::bytes(), ccs_getinfo(), CcsConnectIpWithTimeout(), CcsHandleRequest(), CcsNoDelayedReply(), CcsReleaseMessages(), CcsSendDelayedReply(), CcsServer_recvRequestData(), CcsServerCheck(), CfutureDestroy(), CheckVolKWayPartitionParams(), ChMessage_free(), TempoArray::ckTempoReduce(), CldComputeNeighborData(), CldMultipleSend(), CldMultipleSendPrio(), PUP::able::clone(), CMI_VMI_CmiFree(), CMI_VMI_Connection_Handler(), CMI_VMI_Initialize_VMI(), CMI_VMI_Open_Connections(), CMI_VMI_Read_Environment(), CMI_VMI_Startup_Charmrun(), CMI_VMI_Startup_CRM(), CmiArgInit(), CmiBacktracePrint(), CmiClearReduction(), CmiDestoryAllPersistent(), CmiDestoryPersistent(), CmiDestroyLock(), CmiError(), CmiExitPxshm(), CmiExitSysvshm(), CmiExitXpmem(), CmiExtendHandlerTable(), CmiFreeAligned(), CmiFreeNotifyCommThdMsg(), CmiGetNonLocal(), CmiGetReductionCreate(), CmiInitMemAffinity(), CmiIsFortranLibraryCall(), CmiOutOfMemory(), CmiPrintf(), CmiReleaseSentMessages(), CmiSendMessagePxshm(), CmiSendMessageXpmem(), CmiTmpFree(), CmmPup(), complete_tab_node(), ComputeElementBalance(), ComputePartitionBalance(), ComputePartitionInfo(), ComputePartitionInfoBipartite(), ComputeVolume(), redistributor2D::continueToNextStep(), ConverseExit(), Coordinate_Partition(), CPathForwardReduction(), CpdConditional_SetupComm(), CpdDebugReturnAllocationTree(), CpdDebugReturnMemStat(), Cpthread_cleanup_pop(), Cpthread_detach(), Cpthread_exit(), Cpthread_join(), CthFree(), CthResume1(), CthResumeNormalThread(), CthResumeNormalThreadDebug(), CthThreadBaseFree(), CthThreadFree(), CWeb_Deliver(), delete_btree(), delete_group_list(), delete_list_array(), delete_slotset(), derive_shared_nodes(), CkPoolQueue< type >::destroyAll(), destroySet(), FEM_Adapt_Algs::didItFlip(), disabled_unmap(), display_other_heuristics(), do_load(), FEM_MUtil::eatIntoElement(), FEM_AdaptL::edge_bisect(), BulkAdapt::edge_bisect_3D(), FEM_Adapt::edge_bisect_help(), FEM_AdaptL::edge_contraction(), FEM_AdaptL::edge_contraction_help(), FEM_AdaptL::edge_flip(), FEM_Adapt::edge_flip_help(), EliminateVolComponents(), FuncNodeHelper::exit(), expand_cblist(), expand_ccd_heap(), fast_grouping(), FEM_add_element(), FEM_Ghost_Essential_attributes(), FEM_Interpolate::FEM_InterpolateCopyAttributes(), FEM_Interpolate::FEM_InterpolateNodeOnEdge(), FEM_Modify_correctLockN(), FEM_Modify_LockN(), FEM_Modify_UnlockN(), FEM_MUtil::FEM_Print_coords(), FEM_purge_element(), FEM_remove_element(), FEM_remove_node_local(), FIFO_Destroy(), FIFO_Expand(), find_largest_free_region(), FindComponents(), FEM_Adapt::findElementWithNodes(), FindVtxPerm(), FPQueueFree(), free_bucket(), free_bucket_list(), free_list_child(), free_nomigrate(), free_reentrant(), free_tab_bucket(), free_tab_child(), free_tab_double(), free_tab_int(), free_topology(), free_tree(), compressedBuffer::freeBuf(), FreeGraph(), objListMsg::freeHeapAllocated(), FreeInitialGraphAndRemap(), BulkAdapt::freeTableID(), g_freeGraph(), GENDUALMETIS(), generate_random_sol(), FEM_Adapt_Algs::getArea(), getAvailMemory(), FEM_Adapt_Algs::getCoord(), NetFEM_state::getCurrent(), FEM_Adapt_Algs::getShortestEdge(), getXTNodeID(), GKfree(), group_nodes(), BulkAdapt::handle_split_3D(), HEXNODALMETIS(), CkListString::includes(), infi_CmiFree(), infi_CmiFreeDirect(), infi_unregAndFreeMeta(), InitMultisection(), sim::InternalCommitPrintf(), KillOnAllSigs(), LabelSeparators(), FEM_Adapt_Algs::length(), list_delete(), listToMessage(), load_symtab(), CentralLB::LoadBalance(), FEM_lock::lock(), BulkAdapt::lock_3D_region(), chunk::lockLocalChunk(), main(), map_topology(), merge(), METIS_PartGraphKway(), METIS_PartGraphKway2(), METIS_PartGraphRecursive(), METIS_PartGraphVKway(), METIS_WPartGraphRecursive(), MinCover_Decompose(), MlevelNestedDissectionCC(), MlevelNodeBisectionMultiple(), MMDOrder(), Moc_AssembleAdaptiveGraph(), Moc_ComputePartitionBalance(), Moc_Global_CreateCoarseGraph(), Moc_KeepPart(), Moc_MoveGraph(), MPI_Info_delete(), MPI_Info_free(), MPI_Info_set(), MPICH_AlltoAll_medium(), MPICH_AlltoAll_short(), FEM_Adapt::n2e_exists(), NetFEM_End(), TraceEntry::operator delete(), BinEntry::operator delete(), LogEntry::operator delete(), ckcomplex::operator delete[](), femMeshModify::packEntData(), ParFUM_recreateSharedNodes(), ParMETIS_PartGeomKway(), ParMETIS_PartGeomRefine(), ParMETIS_PartKway(), ParMETIS_RefineKway(), ParMETIS_RepartGDiffusion(), ParMETIS_RepartLDiffusion(), ParMETIS_RepartMLRemap(), ParMETIS_RepartRemap(), ParMETIS_SerialNodeND(), ParMETIS_V3_NodeND(), ParMETIS_V3_PartGeomKway(), ParMETIS_V3_PartKway(), partial_sort(), PartitionSmallGraph(), PartSort(), PCQueueDestroy(), PCQueuePop(), persistentDestoryHandler(), pidtonid(), postInitialRecvs(), ComlibManager::printPeList(), printStats(), PrintSubDomainGraph(), processBufferedBcast(), processBufferedRdmaAcks(), processFutureMessages(), processRdmaWC(), ProjectInfoBack(), PipeBroadcastConverse::propagate(), PruneGraph(), redistributor2D::pup(), CProxy::pup(), pushSendQ(), QUADNODALMETIS(), memoryBuffer::reallocate(), RecBisectBfLB::recursivePartition(), FEM_Adapt_Algs::refine_element_leb(), chunk::removeLock(), FEM_MUtil::removeNodeAll(), memoryBuffer::resize(), opt::Rollback(), search_pemap(), select_independent_groups(), select_independent_groups_by_largest_index(), SendMsgBuf(), InfoStruct::set(), FEM_Adapt_Algs::SetReferenceMesh(), SetUp(), FEM_Adapt_Algs::simple_coarsen(), FEM_Adapt_Algs::simple_refine(), CentralLB::simulationRead(), CentralLB::simulationWrite(), FEM_MUtil::splitEntityAll(), FEM_MUtil::splitEntityRemote(), FEM_MUtil::StructureTest(), TETNODALMETIS(), TreeMatchMapping(), TRINODALMETIS(), FEM_AdaptL::unlockNodes(), FEM_AdaptL::vertex_remove(), FEM_Adapt::vertex_remove_help(), FEM_Adapt::vertex_split_help(), VolSetUpGraph(), ZoltanLB::work(), TreeMatchLB::work(), ScotchTopoLB::work(), ScotchRefineLB::work(), ScotchLB::work(), RecBisectBfLB::work(), TraceEntry::write(), write_stdio_duplicate(), Boomarray< T >::~Boomarray(), CkListString::~CkListString(), CtgGlobalStruct::~CtgGlobalStruct(), Event::~Event(), eventQueue::~eventQueue(), FuncSingleHelper::~FuncSingleHelper(), KeyvalPair::~KeyvalPair(), memoryBuffer::~memoryBuffer(), PythonExecute::~PythonExecute(), SuperBlock::~SuperBlock(), TraceEntry::~TraceEntry(), XT3TorusManager::~XT3TorusManager(), and XTTorusManager::~XTTorusManager().

void * calloc ( size_t  nelem,
size_t  size 
)

void cfree ( void *  ptr  ) 

Definition at line 290 of file memory.c.

References meta_cfree().

void * realloc ( void *  ptr,
size_t  size 
)

void * memalign ( size_t  align,
size_t  size 
)

void * valloc ( size_t  size  ) 

Definition at line 293 of file memory.c.

References meta_valloc().

void CmiMemoryInit ( char **  argv  ) 

Definition at line 298 of file memory.c.

References CmiArgGroup(), CmiOutOfMemoryInit(), and meta_init().

Referenced by ConverseCommonInit().

void* malloc_reentrant ( size_t  size  ) 

Definition at line 308 of file memory.c.

References malloc(), and meta_malloc().

Referenced by add_slots(), create_btree_node(), list_insert(), and new_slotset().

void free_reentrant ( void *  mem  ) 

int sbrk ( int  s  ) 

Definition at line 315 of file memory.c.

static CMK_TYPEDEF_UINT8 MemusageMstats (  )  [inline, static]

Definition at line 323 of file memory.c.

Referenced by CmiMemoryUsage().

static CMK_TYPEDEF_UINT8 MemusageSbrk (  )  [inline, static]

Definition at line 340 of file memory.c.

References MemusageInitSbrkval, and sbrk().

Referenced by CmiMemoryUsage().

static CMK_TYPEDEF_UINT8 MemusageProcSelfStat (  )  [inline, static]

Definition at line 353 of file memory.c.

Referenced by CmiMemoryUsage().

static CMK_TYPEDEF_UINT8 MemusageMallinfo (  )  [inline, static]

Definition at line 374 of file memory.c.

Referenced by CmiMemoryUsage().

static CMK_TYPEDEF_UINT8 MemusagePS (  )  [inline, static]

Definition at line 399 of file memory.c.

References p.

Referenced by CmiMemoryUsage().

static CMK_TYPEDEF_UINT8 MemusageWindows (  )  [inline, static]

Definition at line 424 of file memory.c.

Referenced by CmiMemoryUsage().

static CMK_TYPEDEF_UINT8 MemusageBGP (  )  [inline, static]

Definition at line 447 of file memory.c.

References mallinfo::hblkhd, and mallinfo::uordblks.

Referenced by CmiMemoryUsage().

CMK_TYPEDEF_UINT8 CmiMemoryUsage (  ) 

CMK_TYPEDEF_UINT8 CmiMaxMemoryUsage (  ) 

Return number of maximum number of bytes allocated since the last call to CmiResetMaxMemory(), if possible.

Definition at line 472 of file memory.c.

References _memory_allocated_max.

Referenced by FEM_master_parallel_part(), FTN_NAME(), and controlPointManager::requestMemoryUsage().

void CmiResetMaxMemory (  ) 

Reset the mechanism that records the highest seen (high watermark) memory usage.

Definition at line 473 of file memory.c.

References _memory_allocated, and _memory_allocated_max.

Referenced by CkCacheManager::cacheSync(), and controlPointManager::requestMemoryUsage().

CMK_TYPEDEF_UINT8 CmiMinMemoryUsage (  ) 

Definition at line 474 of file memory.c.

References _memory_allocated_min.

void CmiResetMinMemory (  ) 

Definition at line 475 of file memory.c.

References _memory_allocated, and _memory_allocated_min.

static void meta_init ( char **  argv  )  [static]

Definition at line 496 of file memory.c.

static void* meta_calloc ( size_t  nelem,
size_t  size 
) [static]

Definition at line 551 of file memory.c.

References mm_calloc.

static void meta_cfree ( void *  mem  )  [static]

Definition at line 555 of file memory.c.

References mm_cfree.

static void* meta_valloc ( size_t  size  )  [static]

Definition at line 567 of file memory.c.

References mm_valloc.

void* malloc_nomigrate ( size_t  size  ) 

Definition at line 703 of file memory.c.

References CmiMemLock(), CmiMemUnlock(), malloc(), and mm_malloc.

Referenced by CmiAlloc(), CmiPoolAlloc(), and CmiPoolAllocInit().

void free_nomigrate ( void *  mem  ) 

Definition at line 704 of file memory.c.

References CmiMemLock(), CmiMemUnlock(), free(), and mm_free.

Referenced by CmiFree(), and CmiPoolFree().

CmiIsomallocBlockList* CmiIsomallocBlockListActivate ( CmiIsomallocBlockList l  ) 

Definition at line 710 of file memory.c.

References s.

CmiIsomallocBlockList* CmiIsomallocBlockListCurrent (  ) 

Definition at line 712 of file memory.c.

void CmiEnableIsomalloc (  ) 

Definition at line 715 of file memory.c.

Referenced by TraceBluegene::bgPrint(), and FTN_NAME().

void CmiDisableIsomalloc (  ) 

Definition at line 716 of file memory.c.

Referenced by TraceBluegene::bgPrint(), and FTN_NAME().

void CmiMemoryMark ( void   ) 

Definition at line 720 of file memory.c.

Referenced by CmiMemorySweep().

void CmiMemoryMarkBlock ( void *  blk  ) 

Definition at line 721 of file memory.c.

Referenced by CkArrayBroadcaster::incoming().

void CmiMemorySweep ( const char *  where  ) 

Definition at line 722 of file memory.c.

void CmiMemoryCheck ( void   ) 

Definition at line 723 of file memory.c.

Referenced by _bufferedLocalMessageAckHandler(), _bufferedLocalMessageCopyHandler(), _bufferedTicketHandler(), _bufferedTicketRequestHandler(), _checkpointAckHandler(), _getTicket(), _localMessageAckHandler(), _processTicketRequest(), _removeProcessedLogHandler(), _resendMessagesHandler(), _sendDetsHandler(), _storeDeterminantsHandler(), _ticketHandler(), femMeshModify::addElementRemote(), FEM_MUtil::addElemRemote(), femMeshModify::addGhostElem(), FEM_MUtil::addGhostElementRemote(), ChareMlogData::addLogEntry(), femMeshModify::addNodeRemote(), femMeshModify::addSharedNodeRemote(), FEM_MUtil::addToSharedList(), femMeshModify::addToSharedList(), femMeshModify::addTransIDXLRemote(), FEM_Node::allocateNodeAdjacency(), FEM_MUtil::buildChunkToNodeTable(), checkBufferedLocalMessageCopy(), checkBufferedTicketRequests(), clearUpMigratedRetainedLists(), CmiSendMessagePxshm(), CmiSendMessageSysvshm(), CmiSendMessageXpmem(), CommunicationServerSysvshm(), FEM_Mesh::createElemElemAdj(), FEM_Mesh::createNodeElemAdj(), FEM_Mesh::createNodeNodeAdj(), FEM_Mesh::e2e_getAll(), FEM_Mesh::e2e_getIndex(), FEM_Mesh::e2e_getNbr(), FEM_Mesh::e2e_removeAll(), FEM_Mesh::e2e_replace(), FEM_Mesh::e2e_setAll(), FEM_Mesh::e2e_setIndex(), FEM_Mesh::e2n_getAll(), FEM_Mesh::e2n_getIndex(), FEM_Mesh::e2n_getNode(), FEM_Mesh::e2n_removeAll(), FEM_Mesh::e2n_replace(), FEM_Mesh::e2n_setAll(), FEM_Mesh::e2n_setIndex(), FEM_MUtil::exists_in_IDXL(), FEM_add_element(), FEM_add_element_local(), FEM_add_node(), FEM_add_shared_node_remote(), FEM_Modify_LockN(), FEM_Modify_UnlockN(), FEM_REF_INIT(), FEM_REFINE2D_Split(), FEM_remove_element(), FEM_remove_element_local(), FEM_remove_node(), FEM_remove_node_local(), FORTRAN_AS_C(), FTN_NAME(), FEM_Mesh::get2ElementsOnEdge(), FEM_MUtil::getChunkNos(), femMeshModify::getChunksSharingGhostNode(), FEM_MUtil::getChunksSharingGhostNodeRemote(), FEM_Mesh::getElementOnEdge(), femMeshModify::getIdxGhostSend(), femMeshModify::getRemoteBound(), femMeshModify::getRemoteCoord(), FEM_MUtil::getRemoteIdx(), femMeshModify::hasLockRemoteNode(), FEM_MUtil::idxllock(), FEM_MUtil::idxllockLocal(), femMeshModify::idxllockRemote(), FEM_MUtil::idxlunlock(), FEM_MUtil::idxlunlockLocal(), femMeshModify::idxlunlockRemote(), FEM_MUtil::isShared(), femMeshModify::lockRemoteNode(), FEM_MUtil::lookup_in_IDXL(), makeGhost(), chunk::multipleCoarsen(), FEM_Mesh::n2e_add(), FEM_Mesh::n2e_getAll(), FEM_Mesh::n2e_remove(), FEM_Mesh::n2e_removeAll(), FEM_Mesh::n2e_replace(), FEM_Mesh::n2n_add(), FEM_Mesh::n2n_exists(), FEM_Mesh::n2n_getAll(), FEM_Mesh::n2n_remove(), FEM_Mesh::n2n_removeAll(), FEM_Mesh::n2n_replace(), populateDeterminantTable(), postProcessReceivedMessage(), preProcessReceivedMessage(), processDelayedRemoteMsgQueue(), processReceivedDet(), femMeshModify::refine_flip_element_leb(), femMeshModify::removeElementRemote(), FEM_MUtil::removeElemRemote(), femMeshModify::removeGhostElem(), FEM_MUtil::removeGhostElementRemote(), femMeshModify::removeGhostNode(), FEM_MUtil::removeGhostNodeRemote(), femMeshModify::removeIDXLRemote(), FEM_MUtil::removeNodeAll(), FEM_MUtil::removeNodeRemote(), removeProcessedLogs(), femMeshModify::removeSharedNodeRemote(), FEM_MUtil::Replace_node_local(), retryTicketRequest(), sendBufferedLocalMessageCopy(), sendBufferedTicketRequests(), sendCommonMsg(), sendLocalMessageCopy(), sendLocalMsg(), sendMsg(), sendRemoveLogRequests(), sendTicketRequest(), femMeshModify::setFemMesh(), FEM_Node::setNodeAdjacency(), FEM_MUtil::splitEntityAll(), FEM_MUtil::splitEntityRemote(), startMlogCheckpoint(), ticketLogLocalMessage(), femMeshModify::unlockRemoteNode(), BulkAdapt::update_local_face_adj(), update_new_element_e2e(), femMeshModify::updateIdxlList(), femMeshModify::updateNodeAttrs(), and femMeshModify::verifyIdxlList().

void memory_preallocate_hack (  ) 

Definition at line 726 of file memory.c.

References mm_free, and mm_malloc.

Referenced by CmiOutOfMemoryInit().

void CpdSetInitializeMemory ( int  v  ) 

Definition at line 761 of file memory.c.

Referenced by CkMessageWatcherInit(), and cpd_memory_single_pup().

size_t cpd_memory_length ( void *  lenParam  ) 

Returns the number of total blocks of memory allocated.

Definition at line 762 of file memory.c.

Referenced by CpdCharmInit().

void cpd_memory_pup ( void *  itemParam,
pup_er  p,
CpdListItemsRequest req 
)

Definition at line 763 of file memory.c.

Referenced by cpd_memory_single_pup(), and CpdCharmInit().

void cpd_memory_leak ( void *  itemParam,
pup_er  p,
CpdListItemsRequest req 
)

Definition at line 764 of file memory.c.

void check_memory_leaks ( LeakSearchInfo i  ) 

Definition at line 765 of file memory.c.

Referenced by cpd_memory_single_pup(), and CpdSearchLeaks().

size_t cpd_memory_getLength ( void *  lenParam  ) 

Definition at line 766 of file memory.c.

Referenced by cpd_memory_single_pup(), and CpdCharmInit().

void cpd_memory_get ( void *  itemParam,
pup_er  p,
CpdListItemsRequest req 
)

Definition at line 767 of file memory.c.

Referenced by cpd_memory_single_pup(), and CpdCharmInit().

void CpdMemoryMarkClean ( char *  msg  ) 

Definition at line 768 of file memory.c.

Referenced by cpd_memory_single_pup(), and CpdInit().

void setProtection ( char *  mem,
char *  ptr,
int  len,
int  flag 
)

Definition at line 771 of file memory.c.

Referenced by cpd_memory_single_pup().

void setMemoryTypeChare ( void *  ptr  ) 

void setMemoryTypeMessage ( void *  ptr  ) 

void CpdSystemEnter (  ) 

Definition at line 781 of file memory.c.

Referenced by CmiError(), CmiPrintf(), cpd_memory_single_pup(), CpdAfterEp(), and KillOnAllSigs().

void CpdSystemExit (  ) 

Definition at line 782 of file memory.c.

Referenced by CmiError(), CmiPrintf(), cpd_memory_single_pup(), CpdBeforeEp(), and KillOnAllSigs().

void CpdResetMemory (  ) 

Definition at line 784 of file memory.c.

Referenced by cpd_memory_single_pup(), and CpdBeforeEp().

void CpdCheckMemory (  ) 

Definition at line 785 of file memory.c.

Referenced by cpd_memory_single_pup(), and CpdAfterEp().

int get_memory_allocated_user_total (  ) 

Definition at line 787 of file memory.c.

Referenced by TraceMemory::traceBegin().

void* MemoryToSlot ( void *  ptr  ) 

Definition at line 788 of file memory.c.

Referenced by cpd_memory_single_pup(), and CpdNotify().

int Slot_ChareOwner ( void *  s  ) 

Definition at line 789 of file memory.c.

int Slot_AllocatedSize ( void *  s  ) 

Definition at line 790 of file memory.c.

int Slot_StackTrace ( void *  s,
void ***  stack 
)

Definition at line 791 of file memory.c.

int setMemoryChareIDFromPtr ( void *  ptr  ) 

Definition at line 795 of file memory.c.

Referenced by cpd_memory_single_pup(), and CpdBeforeEp().

void setMemoryChareID ( int  id  ) 

Definition at line 799 of file memory.c.

Referenced by cpd_memory_single_pup(), and CpdAfterEp().

void setMemoryOwnedBy ( void *  ptr,
int  id 
)

void* CmiMallocAligned ( const size_t  size,
const unsigned int  alignment 
)

Definition at line 815 of file memory.c.

References malloc().

void CmiFreeAligned ( void *  ptr  ) 

Definition at line 851 of file memory.c.

References free().


Variable Documentation

Definition at line 52 of file memory.c.

Referenced by cpd_memory_single_pup(), and main().

Definition at line 53 of file memory.c.

Referenced by cpd_memory_single_pup().

void*(* mm_malloc)(size_t) = initialize_memory_wrapper_malloc

void*(* mm_calloc)(size_t, size_t) = initialize_memory_wrapper_calloc

void*(* mm_realloc)(void *, size_t) = initialize_memory_wrapper_realloc

void*(* mm_memalign)(size_t, size_t) = initialize_memory_wrapper_memalign

void*(* mm_valloc)(size_t) = initialize_memory_wrapper_valloc

void(* mm_free)(void *) = initialize_memory_wrapper_free

void(* mm_cfree)(void *) = initialize_memory_wrapper_cfree

CMK_TYPEDEF_UINT8 _memory_allocated = 0

Definition at line 157 of file memory.c.

Referenced by CmiMemoryUsage(), CmiResetMaxMemory(), and CmiResetMinMemory().

CMK_TYPEDEF_UINT8 _memory_allocated_max = 0

Definition at line 158 of file memory.c.

Referenced by CmiMaxMemoryUsage(), and CmiResetMaxMemory().

CMK_TYPEDEF_UINT8 _memory_allocated_min = 0

Definition at line 159 of file memory.c.

Referenced by CmiMinMemoryUsage(), and CmiResetMinMemory().

Definition at line 164 of file memory.c.

Referenced by CmiDisableIsomalloc(), and CmiEnableIsomalloc().

int CmiMemoryIs_flag = 0 [static]

Definition at line 167 of file memory.c.

Referenced by cpd_memory_single_pup(), and meta_init().

char* memory_lifeRaft = NULL [static]

memory_lifeRaft is a very small heap-allocated region.

The lifeRaft is supposed to be just big enough to provide enough memory to cleanly shut down if we run out of memory.

Definition at line 179 of file memory.c.

Referenced by CmiOutOfMemory(), and CmiOutOfMemoryInit().

Definition at line 193 of file memory.c.

Referenced by cpd_memory_single_pup().

Definition at line 194 of file memory.c.

void*(* old_malloc_hook)(size_t, const void *) [static]

Referenced by my_init_hook().

void*(* old_realloc_hook)(void *, size_t, const void *) [static]

Referenced by my_init_hook().

void*(* old_memalign_hook)(size_t, size_t, const void *) [static]

Referenced by my_init_hook().

void(* old_free_hook)(void *, const void *) [static]

Referenced by my_init_hook().

void(* __malloc_initialize_hook)(void) = my_init_hook

int MemusageInited = 0 [static]

Definition at line 335 of file memory.c.

CMK_TYPEDEF_UINT8 MemusageInitSbrkval = 0 [static]

Definition at line 336 of file memory.c.

Referenced by MemusageSbrk().


Generated on Fri May 25 08:00:56 2012 for Charm++ by  doxygen 1.5.5