Wrap sGlobalRawMemory in AIThreadSafe.

This is accessed by different threads.
Other globals like it might also be
accessed by different threads, this has
to be investigated.
This commit is contained in:
Aleric Inglewood
2011-08-05 00:05:08 +02:00
parent 20d2012fc3
commit 881d065220
5 changed files with 25 additions and 10 deletions

View File

@@ -362,12 +362,16 @@ void reset_statistics()
void output_statistics(void*)
{
S32 global_raw_memory;
{
global_raw_memory = *AIAccess<S32>(LLImageRaw::sGlobalRawMemory);
}
llinfos << "Number of orphans: " << gObjectList.getOrphanCount() << llendl;
llinfos << "Number of dead objects: " << gObjectList.mNumDeadObjects << llendl;
llinfos << "Num images: " << gTextureList.getNumImages() << llendl;
llinfos << "Texture usage: " << LLImageGL::sGlobalTextureMemoryInBytes << llendl;
llinfos << "Texture working set: " << LLImageGL::sBoundTextureMemoryInBytes << llendl;
llinfos << "Raw usage: " << LLImageRaw::sGlobalRawMemory << llendl;
llinfos << "Raw usage: " << global_raw_memory << llendl;
llinfos << "Formatted usage: " << LLImageFormatted::sGlobalFormattedMemory << llendl;
llinfos << "Zombie Viewer Objects: " << LLViewerObject::getNumZombieObjects() << llendl;
llinfos << "Number of lights: " << gPipeline.getLightCount() << llendl;