Fix malloc alignment

Bernd Schmidt bernds at codesourcery.com
Wed Apr 6 17:42:06 UTC 2011


On 04/06/2011 07:40 PM, Bernd Schmidt wrote:
> In commit 3e0a1f388, Richard tried to fix malloc alignments by using
>  alignof (double __attribute_aligned__(sizeof (size_t))).
> This doesn't work, since attribute_aligned overrides the alignment
> rather than providing a minimum. On C6X, malloc returns four-byte
> aligned values rather than the necessary eight-byte alignment.
> 
> It's simpler to use a comparison and pick the bigger of the two values,
> so that's what I've done. Ok?

Again with the right address for Richard.


Bernd
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: malloc.diff
URL: <http://lists.busybox.net/pipermail/uclibc/attachments/20110406/685404a7/attachment.diff>


More information about the uClibc mailing list