6 ms·
In C++ you can force that with alignas(), I would imagine other low level languages offer something similar. If you're using a custom allocator you'd have to e
by secondcoming 1y ago
In C++ you can force that with alignas(), I would imagine other low level languages offer something similar.
If you're using a custom allocator you'd have to enfore it yourself which should be fine since you have full control.
https://en.cppreference.com/w/cpp/language/alignas.html https://en.cppreference.com/w/cpp/language/alignas.html
- sparkie 1y agoC23 also has `alignas` and `alignof` (`_Alignas`/`_Alignof` in C11 with the lowercase as macros in stdalign.h), and also provides `aligned_alloc` and `free_aligned_size` in stdlib.