void UpdateTotalMem() { const Shiny::ProfileNode *node = &Shiny::ProfileManager::instance.rootNode; bool b = EnableMemTracker(false); totalmem.clear(); CalcTotalMem(node); EnableMemTracker(b); }
void DisplayVacantMemory() { bool b = EnableMemTracker(false); bMemTracker = false; for(MemTrackerMap::iterator it = memTracker.begin(); it != memTracker.end(); ++it) { MemTrackerStruct &s = (*it).second; UG_LOG("vacant memory: size = " << GetBytesSizeString(s.size) << ", file " << s.pn->zone->file << " : " << s.pn->zone->line << "\n"); } EnableMemTracker(b); }
int UGFinalizeNoPCLFinalize() { EnableMemTracker(false); ug::GetLogAssistant().flush_error_log(); if (outputProfileStats) { UG_LOG(std::endl); // output the profiled data. PROFILER_UPDATE(); if(GetLogAssistant().is_output_process()) { UG_LOG("\n"); #ifdef UG_PROFILER UG_LOG(ug::GetProfileNode(NULL)->call_tree()); #else PROFILER_OUTPUT(); #endif } #ifdef UG_PROFILER //Shiny::ProfileManager::instance.destroy(); #endif } return 0; }