summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2011-01-12 07:51:14 -0800
committerXiaohong Bao <bao@lindenlab.com>2011-01-12 07:51:14 -0800
commitbcb5b209d1813681202524362dd186c8b0982357 (patch)
treee2d8c8c6448f2476123fd8e590665f7f20fe1a20
parent7daa3d1ca10199468946feef0ce8eb67489deee0 (diff)
trivial: fix some mac compiling errors
-rw-r--r--indra/llcommon/llmemory.cpp8
-rw-r--r--indra/llimage/llimage.cpp2
-rw-r--r--indra/newview/llappviewer.cpp2
3 files changed, 6 insertions, 6 deletions
diff --git a/indra/llcommon/llmemory.cpp b/indra/llcommon/llmemory.cpp
index 543f17baf4..875ff9971c 100644
--- a/indra/llcommon/llmemory.cpp
+++ b/indra/llcommon/llmemory.cpp
@@ -398,7 +398,7 @@ void LLPrivateMemoryPool::LLMemoryBlock::init(char* buffer, U32 buffer_size, U32
mSlotSize = slot_size ;
mTotalSlots = buffer_size / mSlotSize ;
- llassert_always(mTotalSlots < 256) ; //max number is 256
+ llassert_always(buffer_size / mSlotSize < 256) ; //max number is 256
mAllocatedSlots = 0 ;
@@ -1137,7 +1137,7 @@ char* LLPrivateMemoryPool::allocate(U32 size)
LLMemoryChunk* chunk = mChunkList[chunk_idx];
while(chunk)
{
- if(p = chunk->allocate(size))
+ if((p = chunk->allocate(size)))
{
break ;
}
@@ -1152,7 +1152,7 @@ char* LLPrivateMemoryPool::allocate(U32 size)
chunk = mChunkList[chunk_idx];
while(chunk)
{
- if(p = chunk->allocate(size))
+ if((p = chunk->allocate(size)))
{
break ;
}
@@ -1185,7 +1185,7 @@ void LLPrivateMemoryPool::free(void* addr)
if(!chunk)
{
- delete[] addr ; //release from heap
+ delete[] (char*)addr ; //release from heap
}
else
{
diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp
index c99313f0ea..3baaa25617 100644
--- a/indra/llimage/llimage.cpp
+++ b/indra/llimage/llimage.cpp
@@ -148,7 +148,7 @@ void LLImageBase::deleteMemory(void* p)
}
else
{
- delete[] p ;
+ delete[] (char*)p ;
}
}
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 664ec7b0fb..c3122504cc 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -977,7 +977,7 @@ void LLAppViewer::initMaxHeapSize()
void LLAppViewer::checkMemory()
{
const static F32 MEMORY_CHECK_INTERVAL = 1.0f ; //second
- const static F32 MAX_QUIT_WAIT_TIME = 30.0f ; //seconds
+ //const static F32 MAX_QUIT_WAIT_TIME = 30.0f ; //seconds
const static U32 MAX_SIZE_CHECKED_MEMORY_BLOCK = 64 * 1024 * 1024 ; //64 MB
//static F32 force_quit_timer = MAX_QUIT_WAIT_TIME + MEMORY_CHECK_INTERVAL ;
static void* last_reserved_address = NULL ;