Memory tracking system updated.

This commit is contained in:
Shyotl
2012-01-29 01:33:14 -06:00
parent 32c6365bf9
commit 9453c2c2e9
25 changed files with 1248 additions and 486 deletions

View File

@@ -170,7 +170,7 @@ void LLImageBase::deleteData()
// virtual
U8* LLImageBase::allocateData(S32 size)
{
LLMemType mt1((LLMemType::EMemType)mMemType);
LLMemType mt1(mMemType);
if (size < 0)
{
@@ -209,7 +209,7 @@ U8* LLImageBase::reallocateData(S32 size)
if(mData && (mDataSize == size))
return mData;
LLMemType mt1((LLMemType::EMemType)mMemType);
LLMemType mt1(mMemType);
U8 *new_datap = (U8*)ALLOCATE_MEM(sPrivatePoolp, size);
if (!new_datap)
{
@@ -457,7 +457,7 @@ void LLImageRaw::clear(U8 r, U8 g, U8 b, U8 a)
// Reverses the order of the rows in the image
void LLImageRaw::verticalFlip()
{
LLMemType mt1((LLMemType::EMemType)mMemType);
LLMemType mt1(mMemType);
S32 row_bytes = getWidth() * getComponents();
U8* line_buffer = new (std::nothrow) U8[row_bytes];
if (!line_buffer )
@@ -595,7 +595,7 @@ void LLImageRaw::composite( LLImageRaw* src )
// Src and dst can be any size. Src has 4 components. Dst has 3 components.
void LLImageRaw::compositeScaled4onto3(LLImageRaw* src)
{
LLMemType mt1((LLMemType::EMemType)mMemType);
LLMemType mt1(mMemType);
llinfos << "compositeScaled4onto3" << llendl;
LLImageRaw* dst = this; // Just for clarity.
@@ -846,7 +846,7 @@ void LLImageRaw::copyUnscaled3onto4( LLImageRaw* src )
// Src and dst can be any size. Src and dst have same number of components.
void LLImageRaw::copyScaled( LLImageRaw* src )
{
LLMemType mt1((LLMemType::EMemType)mMemType);
LLMemType mt1(mMemType);
LLImageRaw* dst = this; // Just for clarity.
llassert_always( (1 == src->getComponents()) || (3 == src->getComponents()) || (4 == src->getComponents()) );
@@ -932,7 +932,7 @@ BOOL LLImageRaw::scaleDownWithoutBlending( S32 new_width, S32 new_height)
BOOL LLImageRaw::scale( S32 new_width, S32 new_height, BOOL scale_image_data )
{
LLMemType mt1((LLMemType::EMemType)mMemType);
LLMemType mt1(mMemType);
llassert((1 == getComponents()) || (3 == getComponents()) || (4 == getComponents()) );
S32 old_width = getWidth();

View File

@@ -35,7 +35,7 @@
#include "lluuid.h"
#include "llstring.h"
#include "llmemory.h"
#include "llmemtype.h"
#include "llthread.h"
#include "aithreadsafe.h"
@@ -162,7 +162,7 @@ private:
static LLPrivateMemoryPool* sPrivatePoolp ;
public:
S16 mMemType; // debug
LLMemType::DeclareMemType& mMemType; // debug
};
// Raw representation of an image (used for textures, and other uncompressed formats

View File

@@ -297,7 +297,7 @@ BOOL LLImageJ2C::decode(LLImageRaw *raw_imagep, F32 decode_time)
// Returns TRUE to mean done, whether successful or not.
BOOL LLImageJ2C::decodeChannels(LLImageRaw *raw_imagep, F32 decode_time, S32 first_channel, S32 max_channel_count )
{
LLMemType mt1((LLMemType::EMemType)mMemType);
LLMemType mt1(mMemType);
BOOL res = TRUE;
@@ -347,7 +347,7 @@ BOOL LLImageJ2C::encode(const LLImageRaw *raw_imagep, F32 encode_time)
BOOL LLImageJ2C::encode(const LLImageRaw *raw_imagep, const char* comment_text, F32 encode_time)
{
LLMemType mt1((LLMemType::EMemType)mMemType);
LLMemType mt1(mMemType);
resetLastError();
BOOL res = mImpl->encodeImpl(*this, *raw_imagep, comment_text, encode_time, mReversible);
if (!mLastError.empty())
@@ -529,7 +529,7 @@ BOOL LLImageJ2C::loadAndValidate(const std::string &filename)
BOOL LLImageJ2C::validate(U8 *data, U32 file_size)
{
LLMemType mt1((LLMemType::EMemType)mMemType);
LLMemType mt1(mMemType);
resetLastError();