summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2012-01-26 14:08:30 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2012-01-26 14:08:30 -0500
commit8a75b5562b2194d9488a892b51cd19bb75fb32b7 (patch)
tree7f3d7e98f692388caa34ce6159a1ee966fed61b7 /indra
parent0b16411d302c940ff98ae5529821d9b5a4dbfbd7 (diff)
parent16b6595fa75047c6c53ee11a6c3004e99ae0937d (diff)
merge
Diffstat (limited to 'indra')
-rw-r--r--indra/cmake/Copy3rdPartyLibs.cmake9
-rwxr-xr-xindra/llcommon/llmemory.h20
-rwxr-xr-xindra/newview/CMakeLists.txt4
3 files changed, 15 insertions, 18 deletions
diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake
index 394db362b1..966300f1c7 100644
--- a/indra/cmake/Copy3rdPartyLibs.cmake
+++ b/indra/cmake/Copy3rdPartyLibs.cmake
@@ -55,10 +55,10 @@ if(WINDOWS)
glod.dll
)
- if(USE_GOOGLE_PERFTOOLS)
+ if(USE_TCMALLOC)
set(debug_files ${debug_files} libtcmalloc_minimal-debug.dll)
set(release_files ${release_files} libtcmalloc_minimal.dll)
- endif(USE_GOOGLE_PERFTOOLS)
+ endif(USE_TCMALLOC)
if (FMOD)
set(debug_files ${debug_files} fmod.dll)
@@ -268,13 +268,16 @@ elseif(LINUX)
libopenal.so
libopenjpeg.so
libssl.so
- libtcmalloc_minimal.so
libuuid.so.16
libuuid.so.16.0.22
libssl.so.1.0.0
libfontconfig.so.1.4.4
)
+ if (USE_TCMALLOC)
+ set(release_files ${release_files} "libtcmalloc_minimal.so")
+ endif (USE_TCMALLOC)
+
if (FMOD)
set(release_files ${release_files} "libfmod-3.75.so")
endif (FMOD)
diff --git a/indra/llcommon/llmemory.h b/indra/llcommon/llmemory.h
index 1b54b56107..9dd776ff57 100755
--- a/indra/llcommon/llmemory.h
+++ b/indra/llcommon/llmemory.h
@@ -27,7 +27,6 @@
#define LLMEMORY_H
#include "llmemtype.h"
-#if !LL_USE_TCMALLOC
inline void* ll_aligned_malloc( size_t size, int align )
{
void* mem = malloc( size + (align - 1) + sizeof(void*) );
@@ -43,6 +42,7 @@ inline void ll_aligned_free( void* ptr )
free( ((void**)ptr)[-1] );
}
+#if !LL_USE_TCMALLOC
inline void* ll_aligned_malloc_16(size_t size) // returned hunk MUST be freed with ll_aligned_free_16().
{
#if defined(LL_WINDOWS)
@@ -79,6 +79,12 @@ inline void ll_aligned_free_16(void *p)
free(p); // posix_memalign() is compatible with heap deallocator
#endif
}
+#else // USE_TCMALLOC
+// ll_aligned_foo_16 are not needed with tcmalloc
+#define ll_aligned_malloc_16 malloc
+#define ll_aligned_realloc_16 realloc
+#define ll_aligned_free_16 free
+#endif // USE_TCMALLOC
inline void* ll_aligned_malloc_32(size_t size) // returned hunk MUST be freed with ll_aligned_free_32().
{
@@ -106,18 +112,6 @@ inline void ll_aligned_free_32(void *p)
#endif
}
-#else // USE_TCMALLOC
-// ll_aligned_foo are noops now that we use tcmalloc everywhere
-// (tcmalloc aligns automatically at appropriate intervals)
-#define ll_aligned_malloc( size, align ) malloc(size)
-#define ll_aligned_free( ptr ) free(ptr)
-#define ll_aligned_malloc_16 malloc
-#define ll_aligned_realloc_16 realloc
-#define ll_aligned_free_16 free
-#define ll_aligned_malloc_32 malloc
-#define ll_aligned_free_32 free
-#endif // LL_DEBUG
-
#ifndef __DEBUG_PRIVATE_MEM__
#define __DEBUG_PRIVATE_MEM__ 0
#endif
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index f929e8d379..3e8b365f3a 100755
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1526,7 +1526,7 @@ if (WINDOWS)
# In the meantime, if you have any ideas on how to easily maintain one list, either here or in viewer_manifest.py
# and have the build deps get tracked *please* tell me about it.
- if(USE_GOOGLE_PERFTOOLS)
+ if(USE_TCMALLOC)
# Configure a var for tcmalloc location, if used.
# Note the need to specify multiple names explicitly.
set(GOOGLE_PERF_TOOLS_SOURCE
@@ -1534,7 +1534,7 @@ if (WINDOWS)
${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/libtcmalloc_minimal.dll
${SHARED_LIB_STAGING_DIR}/Debug/libtcmalloc_minimal-debug.dll
)
- endif(USE_GOOGLE_PERFTOOLS)
+ endif(USE_TCMALLOC)
set(COPY_INPUT_DEPENDENCIES