Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7956 Discussions

Option for 16-byte alignment allocations

kfsone
New Contributor I
217 Views

Would it be possible to add an option to ICC to force malloc/new/etc to perform 16-byte aligned allocations by default and to ensure that structure/class sizes become 16-byte based (including vtable, RTTI etc)?

For large, pre-existing projects where retrofitting healthy SSE-oriented behavior is likely to be an issue ... this would be hugely helpful.

0 Kudos
1 Reply
TimP
Honored Contributor III
217 Views

For 32-bit icc, you must use one of the special families of malloc, such as mm_malloc (which isn't 64-bit compatible), aligned_malloc, kmp_malloc. The 64-bit library ABI requirest the malloc to be 16-byte aligned.

0 Kudos
Reply