[PATCH] PPC32 Linuxthreads Chance MALLOC_ALIGNMENT for VMX
Andreas Schwab
schwab@suse.de
Thu Mar 11 17:28:00 GMT 2004
Ulrich Drepper <drepper@redhat.com> writes:
> 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.
I disagree.
7.20.3 Memory management functions
1 ... The pointer returned if the allocation succeeds is suitably aligned
so that it may be assigned to a pointer to any type of object and then
used to access such an object or an array of such objects in the space
allocated (until the space is explicitly deallocated).
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, MaxfeldstraÃe 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
More information about the Libc-alpha
mailing list