summaryrefslogtreecommitdiff
path: root/indra/llcommon/lltracethreadrecorder.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-10-03 16:57:15 -0700
committerRichard Linden <none@none>2013-10-03 16:57:15 -0700
commit1821fa12838974c4eb7de2b6e9f79bf8a4cf23f1 (patch)
tree99ccab3d0173cdfc542efdf66c1a9284d1398856 /indra/llcommon/lltracethreadrecorder.cpp
parent3b6004adf7c897d48a60f7a4d9b0e27dc7656932 (diff)
fixed memory tracking of lltrace system
Diffstat (limited to 'indra/llcommon/lltracethreadrecorder.cpp')
-rw-r--r--indra/llcommon/lltracethreadrecorder.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/indra/llcommon/lltracethreadrecorder.cpp b/indra/llcommon/lltracethreadrecorder.cpp
index bf6189dd25..9dac4f6771 100644
--- a/indra/llcommon/lltracethreadrecorder.cpp
+++ b/indra/llcommon/lltracethreadrecorder.cpp
@@ -80,7 +80,7 @@ void ThreadRecorder::init()
TimeBlock::getRootTimeBlock().getCurrentAccumulator().mActiveCount = 1;
- claim_alloc(gTraceMemStat, sizeof(*this));
+ claim_alloc(gTraceMemStat, this);
claim_alloc(gTraceMemStat, sizeof(BlockTimer));
claim_alloc(gTraceMemStat, sizeof(TimeBlockTreeNode) * mNumTimeBlockTreeNodes);
}
@@ -98,7 +98,7 @@ ThreadRecorder::~ThreadRecorder()
{
LLThreadLocalSingletonPointer<BlockTimerStackRecord>::setInstance(NULL);
- disclaim_alloc(gTraceMemStat, sizeof(*this));
+ disclaim_alloc(gTraceMemStat, this);
disclaim_alloc(gTraceMemStat, sizeof(BlockTimer));
disclaim_alloc(gTraceMemStat, sizeof(TimeBlockTreeNode) * mNumTimeBlockTreeNodes);
@@ -190,13 +190,13 @@ ThreadRecorder::active_recording_list_t::iterator ThreadRecorder::bringUpToDate(
void ThreadRecorder::deactivate( AccumulatorBufferGroup* recording )
{
- active_recording_list_t::iterator recording_to_remove = bringUpToDate(recording);
- if (recording_to_remove != mActiveRecordings.end())
+ active_recording_list_t::iterator recording_it = bringUpToDate(recording);
+ if (recording_it != mActiveRecordings.end())
{
- bool was_current = (*recording_to_remove)->mPartialRecording.isCurrent();
- llassert((*recording_to_remove)->mTargetRecording == recording);
- delete *recording_to_remove;
- mActiveRecordings.erase(recording_to_remove);
+ ActiveRecording* recording_to_remove = *recording_it;
+ bool was_current = recording_to_remove->mPartialRecording.isCurrent();
+ llassert(recording_to_remove->mTargetRecording == recording);
+ mActiveRecordings.erase(recording_it);
if (was_current)
{
if (mActiveRecordings.empty())
@@ -208,6 +208,7 @@ void ThreadRecorder::deactivate( AccumulatorBufferGroup* recording )
mActiveRecordings.back()->mPartialRecording.makeCurrent();
}
}
+ delete recording_to_remove;
}
}