Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
7677 Discussions

Option for 16-byte alignment allocations

kfsone
New Contributor I
116 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
Black Belt
116 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.

Reply