summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2012-08-31 15:27:38 -0500
committerDave Parks <davep@lindenlab.com>2012-08-31 15:27:38 -0500
commitd81d0433a5482602a7cdae590b3a0ffdc5cb79f9 (patch)
treee3b680f2c31831d5d2b40bb5d20c7b067b24fd16 /indra
parentc1c80133a29b97112c887a75252fafe7a70d9a78 (diff)
MAINT-1503 Fix for ll_aligned_realloc returning non-aligned pointers on linux
Diffstat (limited to 'indra')
-rw-r--r--indra/llcommon/llmemory.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/indra/llcommon/llmemory.h b/indra/llcommon/llmemory.h
index 6a2323e7d8..ebef3f98d6 100644
--- a/indra/llcommon/llmemory.h
+++ b/indra/llcommon/llmemory.h
@@ -68,7 +68,11 @@ inline void* ll_aligned_realloc_16(void* ptr, size_t size) // returned hunk MUST
#elif defined(LL_DARWIN)
return realloc(ptr,size); // default osx malloc is 16 byte aligned.
#else
- return realloc(ptr,size); // FIXME not guaranteed to be aligned.
+ //FIXME: memcpy is SLOW
+ void* ret = ll_aligned_malloc_16(size);
+ memcpy(ret, ptr, old_size);
+ ll_aligned_free_16(ptr);
+ return ret;
#endif
}