diff options
| author | Richard Linden <none@none> | 2012-12-18 00:58:26 -0800 |
|---|---|---|
| committer | Richard Linden <none@none> | 2012-12-18 00:58:26 -0800 |
| commit | 1f56e57008f5a50c9e75fc0b4512c483ac359a52 (patch) | |
| tree | 6631b12beaf3cf64e093730e9c93df34b883472c /indra/llimage/llimage.cpp | |
| parent | 8c2e3bea71ea15b805a9e2a288744f10d195d803 (diff) | |
SH-3468 WIP add memory tracking base class
created memory tracking trace type
instrumented a few classes with memory tracking
Diffstat (limited to 'indra/llimage/llimage.cpp')
| -rw-r--r-- | indra/llimage/llimage.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp index 914bf836c1..22dd809ef3 100644 --- a/indra/llimage/llimage.cpp +++ b/indra/llimage/llimage.cpp @@ -157,7 +157,8 @@ void LLImageBase::sanityCheck() // virtual void LLImageBase::deleteData() { - FREE_MEM(sPrivatePoolp, mData) ; + FREE_MEM(sPrivatePoolp, mData); + memDisclaim(mDataSize); mData = NULL; mDataSize = 0; } @@ -201,6 +202,7 @@ U8* LLImageBase::allocateData(S32 size) mBadBufferAllocation = true ; } mDataSize = size; + memClaim(mDataSize); } return mData; @@ -222,7 +224,9 @@ U8* LLImageBase::reallocateData(S32 size) FREE_MEM(sPrivatePoolp, mData) ; } mData = new_datap; + memDisclaim(mDataSize); mDataSize = size; + memClaim(mDataSize); return mData; } @@ -1584,7 +1588,9 @@ static void avg4_colors2(const U8* a, const U8* b, const U8* c, const U8* d, U8* void LLImageBase::setDataAndSize(U8 *data, S32 size) { ll_assert_aligned(data, 16); + memDisclaim(mDataSize); mData = data; mDataSize = size; + memClaim(mDataSize); } //static |
