Re: alignment boundary

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

 



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.

Cheers,
Ralf






_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf


[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux