This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

dynamic data alignment

Hi All,

To align variable or table to 32 byte boundary I use this:

char ch __attribute__((__aligned__(32)));
char array[512] a __attribute__((__aligned__(32)));

But I need 32 byte aligned dynamic buffers. So how to tell to the new operator to return 32 byte aligned address?

In this case alignment is ignored.

char * ptr;
ptr = new char[buffsize] __attribute__((__aligned__(32)));

So how to do it?