aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llcommon/llmemory.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/llcommon/llmemory.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/linden/indra/llcommon/llmemory.cpp b/linden/indra/llcommon/llmemory.cpp
index 284c8e7..65f3409 100644
--- a/linden/indra/llcommon/llmemory.cpp
+++ b/linden/indra/llcommon/llmemory.cpp
@@ -69,6 +69,7 @@ S32 LLMemType::sCurType = LLMemType::MTYPE_INIT;
69S32 LLMemType::sType[LLMemType::MTYPE_MAX_DEPTH]; 69S32 LLMemType::sType[LLMemType::MTYPE_MAX_DEPTH];
70S32 LLMemType::sMemCount[LLMemType::MTYPE_NUM_TYPES] = { 0 }; 70S32 LLMemType::sMemCount[LLMemType::MTYPE_NUM_TYPES] = { 0 };
71S32 LLMemType::sMaxMemCount[LLMemType::MTYPE_NUM_TYPES] = { 0 }; 71S32 LLMemType::sMaxMemCount[LLMemType::MTYPE_NUM_TYPES] = { 0 };
72S32 LLMemType::sNewCount[LLMemType::MTYPE_NUM_TYPES] = { 0 };
72S32 LLMemType::sOverheadMem = 0; 73S32 LLMemType::sOverheadMem = 0;
73 74
74const char* LLMemType::sTypeDesc[LLMemType::MTYPE_NUM_TYPES] = 75const char* LLMemType::sTypeDesc[LLMemType::MTYPE_NUM_TYPES] =
@@ -133,7 +134,7 @@ void LLMemType::printMem()
133 { 134 {
134 if (sMemCount[i]) 135 if (sMemCount[i])
135 { 136 {
136 llinfos << llformat("MEM: % 20s %03d MB (%03d MB)",sTypeDesc[i],sMemCount[i]>>20,sMaxMemCount[i]>>20) << llendl; 137 llinfos << llformat("MEM: % 20s %03d MB (%03d MB) in %06d News",sTypeDesc[i],sMemCount[i]>>20,sMaxMemCount[i]>>20, sNewCount[i]) << llendl;
137 } 138 }
138 misc_mem -= sMemCount[i]; 139 misc_mem -= sMemCount[i];
139 } 140 }
@@ -180,6 +181,7 @@ void* ll_allocate (size_t size)
180 { 181 {
181 LLMemType::sMaxMemCount[LLMemType::sCurType] = LLMemType::sMemCount[LLMemType::sCurType]; 182 LLMemType::sMaxMemCount[LLMemType::sCurType] = LLMemType::sMemCount[LLMemType::sCurType];
182 } 183 }
184 LLMemType::sNewCount[LLMemType::sCurType]++;
183#endif 185#endif
184 return (void*)p; 186 return (void*)p;
185} 187}
@@ -205,6 +207,7 @@ void ll_release (void *pin)
205#if MEM_TRACK_TYPE 207#if MEM_TRACK_TYPE
206 LLMemType::sMemCount[type] -= size; 208 LLMemType::sMemCount[type] -= size;
207 LLMemType::sOverheadMem -= 4; 209 LLMemType::sOverheadMem -= 4;
210 LLMemType::sNewCount[type]--;
208#endif 211#endif
209 LLMemType::sTotalMem -= size; 212 LLMemType::sTotalMem -= size;
210 free(p); 213 free(p);