On iOS, alignment is currently 16 bytes, as you discovered. However, this is not guaranteed or documented. That is, do not rely on him.
Assuming it's available in iOS, posix_memalign() allows you to allocate specially aligned memory. There may be other mechanisms.
Android is not my bailiwick.
bbum
source share