summaryrefslogtreecommitdiff
path: root/indra/llappearance
diff options
context:
space:
mode:
authorcallum_linden <none@none>2014-12-11 16:32:13 -0800
committercallum_linden <none@none>2014-12-11 16:32:13 -0800
commitf81c5a4e94a26689cd3cfa8078bb9cde360541a0 (patch)
treeb07242bf5df3aff5c888fb22ba09bdb366f3405c /indra/llappearance
parenta2bb483f2d56362e5ea77b8e6471cc0f03740956 (diff)
Add bespoke ctor/dtor that align on 16byte boundaries when creating things on the heap
Diffstat (limited to 'indra/llappearance')
-rw-r--r--indra/llappearance/llpolymorph.h10
-rw-r--r--indra/llappearance/llpolyskeletaldistortion.h13
2 files changed, 23 insertions, 0 deletions
diff --git a/indra/llappearance/llpolymorph.h b/indra/llappearance/llpolymorph.h
index 7e712f9e94..3c2c68079c 100644
--- a/indra/llappearance/llpolymorph.h
+++ b/indra/llappearance/llpolymorph.h
@@ -182,6 +182,16 @@ public:
void applyMask(U8 *maskData, S32 width, S32 height, S32 num_components, BOOL invert);
void addPendingMorphMask() { mNumMorphMasksPending++; }
+ void* operator new(size_t size)
+ {
+ return ll_aligned_malloc_16(size);
+ }
+
+ void operator delete(void* ptr)
+ {
+ ll_aligned_free_16(ptr);
+ }
+
protected:
LLPolyMorphTarget(const LLPolyMorphTarget& pOther);
diff --git a/indra/llappearance/llpolyskeletaldistortion.h b/indra/llappearance/llpolyskeletaldistortion.h
index ea2adb8a87..ab1a132d19 100644
--- a/indra/llappearance/llpolyskeletaldistortion.h
+++ b/indra/llappearance/llpolyskeletaldistortion.h
@@ -73,6 +73,19 @@ public:
/*virtual*/ BOOL parseXml(LLXmlTreeNode* node);
+
+
+ void* operator new(size_t size)
+ {
+ return ll_aligned_malloc_16(size);
+ }
+
+ void operator delete(void* ptr)
+ {
+ ll_aligned_free_16(ptr);
+ }
+
+
protected:
typedef std::vector<LLPolySkeletalBoneInfo> bone_info_list_t;
bone_info_list_t mBoneInfoList;