Re: Memory alignment

2017-02-06 Thread Raimo Niskanen
On Fri, Feb 03, 2017 at 04:07:25PM +0100, Boudewijn Dijkstra wrote: > Op Sat, 28 Jan 2017 06:26:16 +0100 schreef Damian McGuckin > : > > What is the recommended most portable way to force memory alignment for > > a datum of any type, assuming one has a pointer say > > > >

Re: Memory alignment

2017-02-06 Thread Boudewijn Dijkstra
Op Sat, 28 Jan 2017 06:26:16 +0100 schreef Damian McGuckin : What is the recommended most portable way to force memory alignment for a datum of any type, assuming one has a pointer say char *x I currently use something like char *xany = aligntonext(x,

Re: Memory alignment

2017-01-28 Thread Damian McGuckin
On Sat, 28 Jan 2017, Kyoung Jae Seo wrote: Maybe posix_memalign(3) is API you are looking for. No. This allocates memory. I already have the buffer. I am trying to use space within it. Regards - Damian Pacific Engineering Systems International, 277-279 Broadway, Glebe NSW 2037

Re: Memory alignment

2017-01-27 Thread Kyoung Jae Seo
Hi. On Sat, Jan 28, 2017 at 04:26:16PM +1100, Damian McGuckin wrote: > What is the recommended most portable way to force memory alignment for a > datum of any type, assuming one has a pointer say > > char *x > > I currently use something like > > char *xany = aligntonext(x,