summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-05-12 18:50:22 -0500
committerDave Parks <davep@lindenlab.com>2011-05-12 18:50:22 -0500
commit8017900e7f536663153451ff788d8662427782ed (patch)
treef200e2bc13d8b9d02050835e7e4492aa63342144 /indra/llcommon
parent93696ac019865898d35d37d1e32d7a4b819a0c93 (diff)
parent2a843e9a6bb5cb70f69794419ab4a7d16ee3c6cb (diff)
merge
Diffstat (limited to 'indra/llcommon')
-rw-r--r--indra/llcommon/llmemory.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/indra/llcommon/llmemory.h b/indra/llcommon/llmemory.h
index 0adb78236e..3bd1403576 100644
--- a/indra/llcommon/llmemory.h
+++ b/indra/llcommon/llmemory.h
@@ -28,7 +28,7 @@
#include "llmemtype.h"
-#if 0 //DON'T use ll_aligned_foo now that we use tcmalloc everywhere (tcmalloc aligns automatically at appropriate intervals)
+#if LL_DEBUG
inline void* ll_aligned_malloc( size_t size, int align )
{
void* mem = malloc( size + (align - 1) + sizeof(void*) );
@@ -95,7 +95,15 @@ inline void ll_aligned_free_32(void *p)
free(p); // posix_memalign() is compatible with heap deallocator
#endif
}
-#endif
+#else // LL_DEBUG
+// 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_free_16 free
+#define ll_aligned_malloc_32 malloc
+#define ll_aligned_free_32 free
+#endif // LL_DEBUG
class LL_COMMON_API LLMemory
{