Aligned operator new support in Intel C++ Compiler

Version:

  • Intel(R) Parallel Studio XE 2015 Composer Edition for C++
  • Intel(R) Parallel Studio XE 2015 Professional Edition for C++

Operating Systems: Windows; Linux; OS X*

Feature Details:

The new released Intel(R) C++ Compiler XE 15.0 in Intel® Parallel Studio XE 2015 Composer Edition for C++ Windows* and Linux* supports the aligned operator "new".

A new header "aligned_new" is provided by the Intel® Parallel Studio XE 2015 Composer Edition for C++ Window* and Linux*

To use the aligned operator new, just include the new header "aligned_new". For example:

#include <cstdint>
#include <cassert>
#include <aligned_new>
using namespace std; 

struct alignas(64) Test
{
    Test() {
        assert((intptr_t)this%64 == 0); 
    }
};  

Test* foo()
{
	Test *p = new Test();
	return p;
}

Note: the support on OS X* has been added in Intel(R) Parallel Studio XE 2015 Composer Edition for C++ update 1.

For more complete information about compiler optimizations, see our Optimization Notice.