autoconf
[Top][All Lists]
Advanced

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

Re: alignment boundary


From: Bob Friesenhahn
Subject: Re: alignment boundary
Date: Fri, 11 May 2007 20:42:04 -0500 (CDT)

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
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/





reply via email to

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