summaryrefslogtreecommitdiff
path: root/indra/llcommon/lltrace.h
diff options
context:
space:
mode:
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;
}