This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PPC32 Linuxthreads Chance MALLOC_ALIGNMENT for VMX


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."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]