6 ms·
There is __attribute__((aligned)) that some compilers provide (e.g. gcc, clang) but it's non-standard.
by int0x80 4y ago
There is __attribute__((aligned)) that some compilers provide (e.g. gcc, clang) but it's non-standard.
- prabhu-yu 4y agoThank you for the respone. Can we write like this? Klass ssc __attribute__((64)); This could convey more info than padding. Further, I wish, gcc could have provided an attribute that explicitly forces for the cache line alignment than just generic alignment. Generic scalar type alignment is not same as the cache line alignment. Example: Klass sc __attribute__((start_at_cache_line));
- account42 4y agoalignas() has been standard for a decade now.