summaryrefslogtreecommitdiff
path: root/indra/llimage/llimage.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2018-01-30 14:03:26 +0000
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2018-01-30 14:03:26 +0000
commit6e445e82e2a1c1559be5193cd2c131c5f1207f55 (patch)
treeba6610b440ae0792539e79f053b086aac0a95ecc /indra/llimage/llimage.cpp
parentb0dedf0b68ab47f6926f9b5d60ea05a1ef68eedf (diff)
MAINT-8091 Removed deprecated and unused private memory pooling
Diffstat (limited to 'indra/llimage/llimage.cpp')
-rw-r--r--indra/llimage/llimage.cpp36
1 files changed, 6 insertions, 30 deletions
diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp
index 4a76d15096..dca03cfe04 100644
--- a/indra/llimage/llimage.cpp
+++ b/indra/llimage/llimage.cpp
@@ -588,7 +588,6 @@ std::string LLImage::sLastErrorMessage;
LLMutex* LLImage::sMutex = NULL;
bool LLImage::sUseNewByteRange = false;
S32 LLImage::sMinimalReverseByteRangePercent = 75;
-LLPrivateMemoryPool* LLImageBase::sPrivatePoolp = NULL ;
//static
void LLImage::initClass(bool use_new_byte_range, S32 minimal_reverse_byte_range_percent)
@@ -596,8 +595,6 @@ void LLImage::initClass(bool use_new_byte_range, S32 minimal_reverse_byte_range_
sUseNewByteRange = use_new_byte_range;
sMinimalReverseByteRangePercent = minimal_reverse_byte_range_percent;
sMutex = new LLMutex(NULL);
-
- LLImageBase::createPrivatePool() ;
}
//static
@@ -605,8 +602,6 @@ void LLImage::cleanupClass()
{
delete sMutex;
sMutex = NULL;
-
- LLImageBase::destroyPrivatePool() ;
}
//static
@@ -644,25 +639,6 @@ LLImageBase::~LLImageBase()
deleteData(); // virtual
}
-//static
-void LLImageBase::createPrivatePool()
-{
- if(!sPrivatePoolp)
- {
- sPrivatePoolp = LLPrivateMemoryPoolManager::getInstance()->newPool(LLPrivateMemoryPool::STATIC_THREADED) ;
- }
-}
-
-//static
-void LLImageBase::destroyPrivatePool()
-{
- if(sPrivatePoolp)
- {
- LLPrivateMemoryPoolManager::getInstance()->deletePool(sPrivatePoolp) ;
- sPrivatePoolp = NULL ;
- }
-}
-
// virtual
void LLImageBase::dump()
{
@@ -696,7 +672,7 @@ void LLImageBase::sanityCheck()
// virtual
void LLImageBase::deleteData()
{
- FREE_MEM(sPrivatePoolp, mData) ;
+ ll_aligned_free_16(mData);
disclaimMem(mDataSize);
mDataSize = 0;
mData = NULL;
@@ -736,7 +712,7 @@ U8* LLImageBase::allocateData(S32 size)
if (!mBadBufferAllocation && (!mData || size != mDataSize))
{
deleteData(); // virtual
- mData = (U8*)ALLOCATE_MEM(sPrivatePoolp, size);
+ mData = (U8*)ll_aligned_malloc_16(size);
if (!mData)
{
LL_WARNS() << "Failed to allocate image data size [" << size << "]" << LL_ENDL;
@@ -763,7 +739,7 @@ U8* LLImageBase::allocateData(S32 size)
// virtual
U8* LLImageBase::reallocateData(S32 size)
{
- U8 *new_datap = (U8*)ALLOCATE_MEM(sPrivatePoolp, size);
+ U8 *new_datap = (U8*)ll_aligned_malloc_16(size);
if (!new_datap)
{
LL_WARNS() << "Out of memory in LLImageBase::reallocateData" << LL_ENDL;
@@ -773,7 +749,7 @@ U8* LLImageBase::reallocateData(S32 size)
{
S32 bytes = llmin(mDataSize, size);
memcpy(new_datap, mData, bytes); /* Flawfinder: ignore */
- FREE_MEM(sPrivatePoolp, mData) ;
+ ll_aligned_free_16(mData) ;
}
mData = new_datap;
disclaimMem(mDataSize);
@@ -1470,7 +1446,7 @@ bool LLImageRaw::scale( S32 new_width, S32 new_height, bool scale_image_data )
if (new_data_size > 0)
{
- U8 *new_data = (U8*)ALLOCATE_MEM(LLImageBase::getPrivatePool(), new_data_size);
+ U8 *new_data = (U8*)ll_aligned_malloc_16(new_data_size);
if(NULL == new_data)
{
return false;
@@ -2169,7 +2145,7 @@ void LLImageFormatted::appendData(U8 *data, S32 size)
S32 newsize = cursize + size;
reallocateData(newsize);
memcpy(getData() + cursize, data, size);
- FREE_MEM(LLImageBase::getPrivatePool(), data);
+ ll_aligned_free_16(data);
}
}
}