diff options
author | Xiaohong Bao <bao@lindenlab.com> | 2011-05-10 21:02:20 -0600 |
---|---|---|
committer | Xiaohong Bao <bao@lindenlab.com> | 2011-05-10 21:02:20 -0600 |
commit | b594d3b04d3095f15750436910debdd5a602a872 (patch) | |
tree | b8c4456373a93d06d5dabc80416170bda1ad71b1 /indra/llimage/llimagej2c.cpp | |
parent | 1213e5d3548a111a39b6556c6178fc4bc655d367 (diff) |
add debug mode to track the memory allocation/deallocation.
Diffstat (limited to 'indra/llimage/llimagej2c.cpp')
-rw-r--r-- | indra/llimage/llimagej2c.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/indra/llimage/llimagej2c.cpp b/indra/llimage/llimagej2c.cpp index 1bdcba6eb5..78e5d58f14 100644 --- a/indra/llimage/llimagej2c.cpp +++ b/indra/llimage/llimagej2c.cpp @@ -372,14 +372,14 @@ BOOL LLImageJ2C::loadAndValidate(const std::string &filename) } else { - U8 *data = (U8*)allocateMemory(file_size); + U8 *data = (U8*)ALLOCATE_MEM(LLImageBase::getPrivatePool(), file_size); apr_size_t bytes_read = file_size; apr_status_t s = apr_file_read(apr_file, data, &bytes_read); // modifies bytes_read infile.close() ; if (s != APR_SUCCESS || (S32)bytes_read != file_size) { - deleteMemory(data); + FREE_MEM(LLImageBase::getPrivatePool(), data); setLastError("Unable to read entire file"); res = FALSE; } |