summaryrefslogtreecommitdiff
path: root/indra/llcommon/lltrace.h
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-10-03 19:05:52 -0700
committerRichard Linden <none@none>2013-10-03 19:05:52 -0700
commitbee38adb347213bc1824dad8a762dc399c3065ec (patch)
treeb1db05808d35d0dcc168a799f8a2a47b6d1160e0 /indra/llcommon/lltrace.h
parent9ae025f8ee8688b25678a243ba19f1398de08060 (diff)
parentf8a85003ddd4bee1ae00fc329c1c1d66d6100cbd (diff)
Automated merge with http://bitbucket.org/lindenlab/viewer-interesting
Diffstat (limited to 'indra/llcommon/lltrace.h')
-rw-r--r--indra/llcommon/lltrace.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/indra/llcommon/lltrace.h b/indra/llcommon/lltrace.h
index 226f64d0c7..3dc2e5248f 100644
--- a/indra/llcommon/lltrace.h
+++ b/indra/llcommon/lltrace.h
@@ -320,23 +320,23 @@ struct MeasureMem<std::basic_string<T>, IS_MEM_TRACKABLE, IS_BYTES>
template<typename T>
-inline void claim_footprint(MemStatHandle& measurement, const T& value)
+inline void claim_alloc(MemStatHandle& measurement, const T& value)
{
S32 size = MeasureMem<T>::measureFootprint(value);
if(size == 0) return;
MemStatAccumulator& accumulator = measurement.getCurrentAccumulator();
accumulator.mSize.sample(accumulator.mSize.hasValue() ? accumulator.mSize.getLastValue() + (F64)size : (F64)size);
- accumulator.mFootprintAllocations.record(size);
+ accumulator.mAllocations.record(size);
}
template<typename T>
-inline void disclaim_footprint(MemStatHandle& measurement, const T& value)
+inline void disclaim_alloc(MemStatHandle& measurement, const T& value)
{
S32 size = MeasureMem<T>::measureFootprint(value);
if(size == 0) return;
MemStatAccumulator& accumulator = measurement.getCurrentAccumulator();
accumulator.mSize.sample(accumulator.mSize.hasValue() ? accumulator.mSize.getLastValue() - (F64)size : -(F64)size);
- accumulator.mFootprintDeallocations.add(size);
+ accumulator.mDeallocations.add(size);
}
template<typename DERIVED, size_t ALIGNMENT = LL_DEFAULT_HEAP_ALIGN>
@@ -370,25 +370,25 @@ public:
void* operator new(size_t size)
{
- claim_footprint(sMemStat, size);
+ claim_alloc(sMemStat, size);
return ll_aligned_malloc(ALIGNMENT, size);
}
void operator delete(void* ptr, size_t size)
{
- disclaim_footprint(sMemStat, size);
+ disclaim_alloc(sMemStat, size);
ll_aligned_free(ALIGNMENT, ptr);
}
void* operator new [](size_t size)
{
- claim_footprint(sMemStat, size);
+ claim_alloc(sMemStat, size);
return ll_aligned_malloc(ALIGNMENT, size);
}
void operator delete[](void* ptr, size_t size)
{
- disclaim_footprint(sMemStat, size);
+ disclaim_alloc(sMemStat, size);
ll_aligned_free(ALIGNMENT, ptr);
}
@@ -397,7 +397,7 @@ public:
void claimMem(const CLAIM_T& value) const
{
S32 size = MeasureMem<CLAIM_T>::measureFootprint(value);
- claim_footprint(sMemStat, size);
+ claim_alloc(sMemStat, size);
mMemFootprint += size;
}
@@ -406,7 +406,7 @@ public:
void disclaimMem(const CLAIM_T& value) const
{
S32 size = MeasureMem<CLAIM_T>::measureFootprint(value);
- disclaim_footprint(sMemStat, size);
+ disclaim_alloc(sMemStat, size);
mMemFootprint -= size;
}