diff options
author | Oz Linden <oz@lindenlab.com> | 2012-09-12 14:36:37 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2012-09-12 14:36:37 -0400 |
commit | 97d969a338c1e4f973eb817ba7701aff51a02ccb (patch) | |
tree | 7e22b1d1f6fa600196dc9310364e45f563eab68e /indra/newview/lldrawable.h | |
parent | 094dc91d0dae4971f6ae89840d791466a6fd6d08 (diff) |
initial attempt to restore changes that make removing tcmalloc possible; not tested
Diffstat (limited to 'indra/newview/lldrawable.h')
-rw-r--r-- | indra/newview/lldrawable.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/indra/newview/lldrawable.h b/indra/newview/lldrawable.h index e2064b79f8..8c7db61502 100644 --- a/indra/newview/lldrawable.h +++ b/indra/newview/lldrawable.h @@ -59,6 +59,7 @@ class LLViewerTexture; const U32 SILHOUETTE_HIGHLIGHT = 0; // All data for new renderer goes into this class. +LL_ALIGN_PREFIX(16) class LLDrawable : public LLRefCount { public: @@ -75,6 +76,16 @@ public: static void initClass(); + void* operator new(size_t size) + { + return ll_aligned_malloc_16(size); + } + + void operator delete(void* ptr) + { + ll_aligned_free_16(ptr); + } + LLDrawable() { init(); } MEM_TYPE_NEW(LLMemType::MTYPE_DRAWABLE); @@ -281,8 +292,8 @@ public: } EDrawableFlags; private: //aligned members - LLVector4a mExtents[2]; - LLVector4a mPositionGroup; + LL_ALIGN_16(LLVector4a mExtents[2]); + LL_ALIGN_16(LLVector4a mPositionGroup); public: LLXformMatrix mXform; @@ -323,7 +334,7 @@ private: static U32 sNumZombieDrawables; static LLDynamicArrayPtr<LLPointer<LLDrawable> > sDeadList; -}; +} LL_ALIGN_POSTFIX(16); inline LLFace* LLDrawable::getFace(const S32 i) const |