diff options
author | Loren Shih <seraph@lindenlab.com> | 2011-05-20 14:56:10 -0400 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2011-05-20 14:56:10 -0400 |
commit | 6f5313caea9bb8458dca23bbaf4f10cd6641c7fb (patch) | |
tree | ac34191250860e5f250cf1cc2e9199cdaa8204f6 /indra/llcommon/llmemory.h | |
parent | eb8221338e0276b9afe8d92738166f97782d48d6 (diff) | |
parent | 0b612741d53a044a0179e1c32018bf8cd4213631 (diff) |
automated merge mesh-development -> davep-mesh-candidate-2010
Diffstat (limited to 'indra/llcommon/llmemory.h')
-rw-r--r-- | indra/llcommon/llmemory.h | 12 |
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 { |