summaryrefslogtreecommitdiff
path: root/indra/llcommon/llmemory.h
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2021-10-14 17:41:38 +0000
committerDave Parks <davep@lindenlab.com>2021-10-14 17:41:38 +0000
commit851767b808c3cb05d718538389ccc1ed3c95d1a1 (patch)
treea287adf69a37cbd39ce4acb52c1a92b2f6dd396d /indra/llcommon/llmemory.h
parent42415ab0cf05cbb1c470ae65a2ab7bed005927dd (diff)
SL-16131 Fix for alignment warnings on Win32 builds.
Diffstat (limited to 'indra/llcommon/llmemory.h')
-rw-r--r--indra/llcommon/llmemory.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/indra/llcommon/llmemory.h b/indra/llcommon/llmemory.h
index 24f86cc11e..2704a495e0 100644
--- a/indra/llcommon/llmemory.h
+++ b/indra/llcommon/llmemory.h
@@ -101,6 +101,19 @@ template <typename T> T* LL_NEXT_ALIGNED_ADDRESS_64(T* address)
#define LL_ALIGN_16(var) LL_ALIGN_PREFIX(16) var LL_ALIGN_POSTFIX(16)
+#define LL_ALIGN_NEW \
+public: \
+ void* operator new(size_t size) \
+ { \
+ return ll_aligned_malloc_16(size); \
+ } \
+ \
+ void operator delete(void* ptr) \
+ { \
+ ll_aligned_free_16(ptr); \
+ }
+
+
//------------------------------------------------------------------------------------------------
//------------------------------------------------------------------------------------------------
// for enable buffer overrun detection predefine LL_DEBUG_BUFFER_OVERRUN in current library