]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Change the default (minimum) client malloc alignment from 8 to 16
authorJulian Seward <jseward@acm.org>
Wed, 27 Apr 2011 23:25:15 +0000 (23:25 +0000)
committerJulian Seward <jseward@acm.org>
Wed, 27 Apr 2011 23:25:15 +0000 (23:25 +0000)
on ppc32-linux.  This is needed to make Altivec-using code work
correctly.  Noticed when running ./auxprogs/gsl16test with gcc-4.6
with args -mcpu=970 -g -O3 -ftree-vectorize on Memcheck, in
which case a few of the tests failed because malloc() returns
8 byte aligned memory when it should return 16-aligned memory.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11715

coregrind/pub_core_mallocfree.h

index 7c3cbb139d31a7bd283a87e3bc965a72bdd092ef..1af76ec0ed4a9b5fbc56d8427e6d8f52ea2d4522 100644 (file)
@@ -70,12 +70,14 @@ typedef Int ArenaId;
 // minimum alignment.  Must be a power of 2 greater than 4, and should be
 // greater than 8.
 #if   defined(VGP_x86_linux)   || \
-      defined(VGP_ppc32_linux) || \
       defined(VGP_arm_linux)
 #  define VG_MIN_MALLOC_SZB        8
 // Nb: We always use 16 bytes for Darwin, even on 32-bits, so it can be used
 // for any AltiVec- or SSE-related type.  This matches the Darwin libc.
+// Also, use 16 bytes for any PPC variant, since 16 is required to make
+// Altiveccery work right.
 #elif defined(VGP_amd64_linux) || \
+      defined(VGP_ppc32_linux) || \
       defined(VGP_ppc64_linux) || \
       defined(VGP_s390x_linux) || \
       defined(VGP_ppc64_aix5)  || \