[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: alignment boundary

From: Ralf Wildenhues
Subject: Re: alignment boundary
Date: Sat, 12 May 2007 08:29:08 +0200 (CEST)
User-agent: SquirrelMail/1.4.9a

Hello Bob, Andrew, all,

* Bob Friesenhahn wrote on Sat, May 12, 2007 at 03:42:04AM CEST:
> On Sat, 12 May 2007, Andrew Makhorin wrote:
> >
> >I am wondering, if there is a way to determine the alignment boundary,
in bytes, i.e. the boundary suitable to allocate data of any type on a
particular platform. An example would be highly appreciated.
> One approach is to use malloc() to allocate some memory and see what 
the alignment of the returned address is:

Its alignment could be much larger than needed, no?

If you have only a finite set of data types to check, then you can use
AC_CHECK_ALIGNOF on (a union of) the types.

Hope that helps.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]