[PATCH] PPC32 Linuxthreads Chance MALLOC_ALIGNMENT for VMX

Ulrich Drepper drepper@redhat.com
Thu Mar 11 16:54:00 GMT 2004


Steve Munroe wrote:
> The Altivec/VMX instructions require 16-byte alignment. So we need to
> change the default alignment for malloc/calloc/realloc to avoid SIGILL
> when uses malloc for vector types.
> 
> Any problems with this change?

Yes.  malloc memory needs only be aligned for the standard types.

If you need higher alignment use posix_memalign.

Other archs have the same requirement.  We are not going to waste memory
for these special cases which must be handled special to be portable anyway.

-- 
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖



More information about the Libc-alpha mailing list