Esempio n. 1
0
void UpdateTotalMem()
{
	const Shiny::ProfileNode *node = &Shiny::ProfileManager::instance.rootNode;
	bool b = EnableMemTracker(false);
	totalmem.clear();
	CalcTotalMem(node);
	EnableMemTracker(b);
}
Esempio n. 2
0
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);
}
Esempio n. 3
0
File: ug.cpp Progetto: miho/ugcore
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;
}