Dragged in a bunch of alignment fixes from LL. Should allow disabling of tcmalloc on windows/linux32 if such is ever implemented.

This commit is contained in:
Shyotl
2012-10-16 02:33:05 -05:00
parent e8ec81bf04
commit 1b89e5c973
32 changed files with 381 additions and 136 deletions

View File

@@ -65,6 +65,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:
@@ -81,6 +82,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);
@@ -290,8 +301,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;
@@ -333,7 +344,7 @@ private:
static U32 sNumZombieDrawables;
static LLDynamicArrayPtr<LLPointer<LLDrawable> > sDeadList;
};
} LL_ALIGN_POSTFIX(16);
inline LLFace* LLDrawable::getFace(const S32 i) const