We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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?
That's what I'm going to do but looking for more elegant solution.
Aligned new and delete are introduced in C++17 en.cppreference.com/.../operator_new so I hope it will be in Keil soon.