summaryrefslogtreecommitdiff
path: root/indra/llcommon/lltrace.h
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-09-19 15:21:46 -0700
committerRichard Linden <none@none>2013-09-19 15:21:46 -0700
commit0dfc08d22a21728ec670bd75e6fd0ed60c97bf06 (patch)
tree96c67d4b22b00ac38104182e97d174efaee21e30 /indra/llcommon/lltrace.h
parent02dc270620bab6d3bd8035294af4be5b35894b1c (diff)
BUILDFIX: more bad merge stuff
also added ability for statbar to show memtrackable info
Diffstat (limited to 'indra/llcommon/lltrace.h')
-rw-r--r--indra/llcommon/lltrace.h26
1 files changed, 19 insertions, 7 deletions
diff --git a/indra/llcommon/lltrace.h b/indra/llcommon/lltrace.h
index 3b4370f947..f677e4349e 100644
--- a/indra/llcommon/lltrace.h
+++ b/indra/llcommon/lltrace.h
@@ -512,12 +512,17 @@ public:
return value;
}
+ const size_t& memClaim(const size_t& size)
+ {
+ claim_mem(sMemStat, size);
+ mMemFootprint += size;
+ return size;
+ }
- template<typename AMOUNT_T>
- AMOUNT_T& memClaimAmount(AMOUNT_T& size)
+ size_t& memClaim(size_t& size)
{
- MemStatAccumulator& accumulator = sMemStat.getCurrentAccumulator();
- mMemFootprint += (size_t)size;
+ claim_mem(sMemStat, size);
+ mMemFootprint += size;
return size;
}
@@ -536,10 +541,17 @@ public:
return value;
}
- template<typename AMOUNT_T>
- AMOUNT_T& memDisclaimAmount(AMOUNT_T& size)
+ const size_t& memDisclaim(const size_t& size)
+ {
+ disclaim_mem(sMemStat, size);
+ mMemFootprint -= size;
+ return size;
+ }
+
+ size_t& memDisclaim(size_t& size)
{
- disclaim_mem(size);
+ disclaim_mem(sMemStat, size);
+ mMemFootprint -= size;
return size;
}