diff options
author | Dave Parks <davep@lindenlab.com> | 2012-08-31 14:11:46 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2012-08-31 14:11:46 -0500 |
commit | de1d297deaedaeff212eb2ff13ec4edef21ce633 (patch) | |
tree | cdb71f6eeeadd6a621031e85f19e9bfe36fe75d8 /indra/newview/llpolymorph.cpp | |
parent | b7555a3309bda8e9689627901051aa90fcb7be34 (diff) |
MAINT-1503 Disable tcmalloc and fix remaining alignment issues.
Diffstat (limited to 'indra/newview/llpolymorph.cpp')
-rw-r--r-- | indra/newview/llpolymorph.cpp | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/indra/newview/llpolymorph.cpp b/indra/newview/llpolymorph.cpp index d25d1420ee..dea8868034 100644 --- a/indra/newview/llpolymorph.cpp +++ b/indra/newview/llpolymorph.cpp @@ -73,9 +73,11 @@ LLPolyMorphData::LLPolyMorphData(const LLPolyMorphData &rhs) : { const S32 numVertices = mNumIndices; - mCoords = new LLVector4a[numVertices]; - mNormals = new LLVector4a[numVertices]; - mBinormals = new LLVector4a[numVertices]; + U32 size = sizeof(LLVector4a)*numVertices; + + mCoords = (LLVector4a*) ll_aligned_malloc_16(size); + mNormals = (LLVector4a*) ll_aligned_malloc_16(size); + mBinormals = (LLVector4a*) ll_aligned_malloc_16(size); mTexCoords = new LLVector2[numVertices]; mVertexIndices = new U32[numVertices]; @@ -95,11 +97,12 @@ LLPolyMorphData::LLPolyMorphData(const LLPolyMorphData &rhs) : //----------------------------------------------------------------------------- LLPolyMorphData::~LLPolyMorphData() { - delete [] mVertexIndices; - delete [] mCoords; - delete [] mNormals; - delete [] mBinormals; + ll_aligned_free_16(mCoords); + ll_aligned_free_16(mNormals); + ll_aligned_free_16(mBinormals); + delete [] mTexCoords; + delete [] mVertexIndices; } //----------------------------------------------------------------------------- @@ -121,9 +124,12 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh) //------------------------------------------------------------------------- // allocate vertices //------------------------------------------------------------------------- - mCoords = new LLVector4a[numVertices]; - mNormals = new LLVector4a[numVertices]; - mBinormals = new LLVector4a[numVertices]; + + U32 size = sizeof(LLVector4a)*numVertices; + + mCoords = (LLVector4a*) ll_aligned_malloc_16(size); + mNormals = (LLVector4a*) ll_aligned_malloc_16(size); + mBinormals = (LLVector4a*) ll_aligned_malloc_16(size); mTexCoords = new LLVector2[numVertices]; // Actually, we are allocating more space than we need for the skiplist mVertexIndices = new U32[numVertices]; |