summaryrefslogtreecommitdiff
path: root/indra/llcommon/lltrace.h
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-09-24 00:05:43 -0700
committerRichard Linden <none@none>2013-09-24 00:05:43 -0700
commitab8f64a96754edaa68dd1ff97b9519eff4496aa6 (patch)
tree79261fb8093affd8d7cb94f492b19ad9eec6e0e2 /indra/llcommon/lltrace.h
parent0a87ffb876f3beec6bc7d192c3aba6edf9ded828 (diff)
converted memory tracking units to KB from B
added more memory tracking to LLFolderView and kin
Diffstat (limited to 'indra/llcommon/lltrace.h')
-rw-r--r--indra/llcommon/lltrace.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/indra/llcommon/lltrace.h b/indra/llcommon/lltrace.h
index 9c620ca5e3..5c833ea287 100644
--- a/indra/llcommon/lltrace.h
+++ b/indra/llcommon/lltrace.h
@@ -268,7 +268,7 @@ public:
setKey(name);
}
- /*virtual*/ const char* getUnitLabel() const { return "B"; }
+ /*virtual*/ const char* getUnitLabel() const { return "KB"; }
TraceType<MemStatAccumulator::AllocationFacet>& allocations()
{
@@ -409,10 +409,12 @@ class MemTrackable
typedef MemTrackable<DERIVED, ALIGNMENT> mem_trackable_t;
static MemStatHandle sMemStat;
+
public:
typedef void mem_trackable_tag_t;
MemTrackable()
+ : mMemFootprint(0)
{
static bool name_initialized = false;
if (!name_initialized)
@@ -427,6 +429,11 @@ public:
memDisclaim(mMemFootprint);
}
+ static MemStatHandle& getMemStatHandle()
+ {
+ return sMemStat;
+ }
+
void* operator new(size_t size)
{
claim_mem(sMemStat, size);