This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] PPC32 Linuxthreads Chance MALLOC_ALIGNMENT for VMX
- From: Ulrich Drepper <drepper at redhat dot com>
- To: sjmunroe at vnet dot ibm dot com
- Cc: libc-alpha at sources dot redhat dot com
- Date: Thu, 11 Mar 2004 08:53:56 -0800
- Subject: Re: [PATCH] PPC32 Linuxthreads Chance MALLOC_ALIGNMENT for VMX
- Organization: Red Hat, Inc.
- References: <405097DF.email@example.com>
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 â