diff options
author | Monty Brandenberg <monty@lindenlab.com> | 2012-11-07 13:28:42 -0500 |
---|---|---|
committer | Monty Brandenberg <monty@lindenlab.com> | 2012-11-07 13:28:42 -0500 |
commit | 0755cb098dc10897106879231989718dbf4abb26 (patch) | |
tree | f34022002eae5a39a5d38bb5a2ade798b184bdea /indra/llmath/tests | |
parent | 4091e47cf206a41cac7ee440b8fd2e2898006685 (diff) | |
parent | bf6d1670756ba96abde570e7dbbf94c62c71ca5b (diff) |
Merge. Refresh DRTVWR-209 with 3.4.2-beta1 code.
Two fairly simple conflicts: dead stats sending code in the
texture fetch code (new llcorehttp library) and the cleanup
code in llappviewer was moved around in 3.4.x.
Diffstat (limited to 'indra/llmath/tests')
-rw-r--r-- | indra/llmath/tests/alignment_test.cpp | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/indra/llmath/tests/alignment_test.cpp b/indra/llmath/tests/alignment_test.cpp index ac0c45ae6f..9105b1c1fd 100644 --- a/indra/llmath/tests/alignment_test.cpp +++ b/indra/llmath/tests/alignment_test.cpp @@ -34,16 +34,6 @@ #include "../llsimdmath.h" #include "../llvector4a.h" -void* operator new(size_t size) -{ - return ll_aligned_malloc_16(size); -} - -void operator delete(void *p) -{ - ll_aligned_free_16(p); -} - namespace tut { @@ -59,6 +49,27 @@ tut::alignment_test_t tut_alignment_test("LLAlignment"); LL_ALIGN_PREFIX(16) class MyVector4a { +public: + void* operator new(size_t size) + { + return ll_aligned_malloc_16(size); + } + + void operator delete(void *p) + { + ll_aligned_free_16(p); + } + + void* operator new[](size_t count) + { // try to allocate count bytes for an array + return ll_aligned_malloc_16(count); + } + + void operator delete[](void *p) + { + ll_aligned_free_16(p); + } + LLQuad mQ; } LL_ALIGN_POSTFIX(16); @@ -78,7 +89,7 @@ void alignment_test_object_t::test<1>() align_ptr = ll_aligned_malloc_16(sizeof(MyVector4a)); ensure("ll_aligned_malloc_16 failed", is_aligned(align_ptr,16)); - align_ptr = ll_aligned_realloc_16(align_ptr,2*sizeof(MyVector4a)); + align_ptr = ll_aligned_realloc_16(align_ptr,2*sizeof(MyVector4a), sizeof(MyVector4a)); ensure("ll_aligned_realloc_16 failed", is_aligned(align_ptr,16)); ll_aligned_free_16(align_ptr); |