summaryrefslogtreecommitdiff
path: root/indra/llcommon/llmemory.h
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2011-12-14 16:18:19 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2011-12-14 16:18:19 -0500
commite68d5e248f73180def7c8928b32482347dd91de4 (patch)
tree9fcc551a62bf83c00ccbd77dc262a48cad068729 /indra/llcommon/llmemory.h
parentdbc91a7fac9513bdd879c5c2dc82208e08eaad2d (diff)
SH-2789 WIP - add asserts to check object address alignment where needed
Diffstat (limited to 'indra/llcommon/llmemory.h')
-rwxr-xr-x[-rw-r--r--]indra/llcommon/llmemory.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/indra/llcommon/llmemory.h b/indra/llcommon/llmemory.h
index bbbdaa6497..baf91bb96d 100644..100755
--- a/indra/llcommon/llmemory.h
+++ b/indra/llcommon/llmemory.h
@@ -512,4 +512,13 @@ void LLPrivateMemoryPoolTester::operator delete[](void* addr)
// LLSingleton moved to llsingleton.h
+#define CHECK_ALIGNMENT
+
+#ifdef CHECK_ALIGNMENT
+#define ll_assert_aligned(ptr,alignment) llassert((reinterpret_cast<uintptr_t>(ptr))%(alignment) == 0)
+#else
+#define ll_assert_aligned(ptr,alignment)
+#endif
+
+
#endif