diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2011-12-14 16:18:19 -0500 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2011-12-14 16:18:19 -0500 |
commit | e68d5e248f73180def7c8928b32482347dd91de4 (patch) | |
tree | 9fcc551a62bf83c00ccbd77dc262a48cad068729 /indra/llcommon | |
parent | dbc91a7fac9513bdd879c5c2dc82208e08eaad2d (diff) |
SH-2789 WIP - add asserts to check object address alignment where needed
Diffstat (limited to 'indra/llcommon')
-rwxr-xr-x[-rw-r--r--] | indra/llcommon/llmemory.h | 9 |
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 |