From 9c2e0d84f84fe7c38b1e9f7a127efc540b43f5aa Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 19 Dec 2011 18:17:18 -0500 Subject: SH-2789 WIP - various fixes to force 16-byte alignment --- indra/llcommon/llmemory.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'indra/llcommon/llmemory.cpp') diff --git a/indra/llcommon/llmemory.cpp b/indra/llcommon/llmemory.cpp index 3b9758f996..22204e756a 100644 --- a/indra/llcommon/llmemory.cpp +++ b/indra/llcommon/llmemory.cpp @@ -61,6 +61,15 @@ BOOL LLMemory::sEnableMemoryFailurePrevention = FALSE; LLPrivateMemoryPoolManager::mem_allocation_info_t LLPrivateMemoryPoolManager::sMemAllocationTracker; #endif +void ll_assert_aligned_func(uintptr_t ptr,U32 alignment) +{ + if (ptr%alignment!=0) + { + llwarns << "alignment check failed" << llendl; + } + llassert(ptr%alignment==0); +} + //static void LLMemory::initClass() { -- cgit v1.2.3 From 1435a8b9e6203911d2ebe9e3ba217f8eb20e3140 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 4 Jan 2012 15:21:23 -0500 Subject: SH-2789 WIP - stricter calling of memcpyNonAliased16 --- indra/llcommon/llmemory.cpp | 3 +++ 1 file changed, 3 insertions(+) mode change 100644 => 100755 indra/llcommon/llmemory.cpp (limited to 'indra/llcommon/llmemory.cpp') diff --git a/indra/llcommon/llmemory.cpp b/indra/llcommon/llmemory.cpp old mode 100644 new mode 100755 index 22204e756a..afaf366668 --- a/indra/llcommon/llmemory.cpp +++ b/indra/llcommon/llmemory.cpp @@ -63,11 +63,14 @@ LLPrivateMemoryPoolManager::mem_allocation_info_t LLPrivateMemoryPoolManager::sM void ll_assert_aligned_func(uintptr_t ptr,U32 alignment) { +#ifdef SHOW_ASSERT + // Redundant, place to set breakpoints. if (ptr%alignment!=0) { llwarns << "alignment check failed" << llendl; } llassert(ptr%alignment==0); +#endif } //static -- cgit v1.2.3