On Thu, Jan 8, 2009 at 9:41 PM, Ian Lance Taylor <i...@google.com> wrote:
> "H.J. Lu" <hjl.to...@gmail.com> writes:
>
>>> There are many ways to align data without exposing it in the
>>> ABI--e.g., the alignment of a global array is not part of the ABI, in
>>> that nothing breaks if the alignment is increased.  Also, there are
>>> many programs which simply don't care about an external ABI.
>>>
>>
>> You can just use a value like __attribute ((aligned (8)))
>> or some value suitable for the variable type. It is
>> as good as any value we can use with
>> __attribute__ ((aligned(max))) today since whatever
>> we choose now may not be appropriate later.
>
> I feel like a broken record here, but if I want maximal performance
> for copying data in and out of a buffer, then I want it maximally
> aligned for the processor.  If I am writing portable code, then I
> don't know what that maximal alignment is.
>

You can't use _attribute__ ((aligned(max))) directly with memory
allocator. How about a new macro, __BIGGEST_ALIGNMENT__?


-- 
H.J.

Reply via email to