Re: alignment boundary

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

 



On Sat, 12 May 2007, Andrew Makhorin wrote:

Hello,

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:

 "The malloc() function returns a pointer to a block of at least size
  bytes suitably aligned for any use."

Bob
======================================
Bob Friesenhahn
bfriesen@xxxxxxxxxxxxxxxxxxx, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/



_______________________________________________
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