Developer Guide and Reference

Contents

Allocating and Freeing Aligned Memory Blocks

To allocate and free aligned blocks of memory use the
_mm_malloc
and
_mm_free
intrinsics. These intrinsics are based on
malloc
and
free
, which are in the
libirc.a
library. You need to include
malloc.h
. The syntax for these intrinsics is as follows:
void* _mm_malloc (size_t size, size_t align )
void _mm_free (void *p)
The
_mm_malloc
routine takes an extra parameter, which is the alignment constraint. This constraint must be a power of two. The pointer that is returned from
_mm_malloc
is guaranteed to be aligned on the specified boundary.
Memory that is allocated using
_mm_malloc
must be freed using
_mm_free
. Calling
free
on memory allocated with
_mm_malloc
or calling
_mm_free
on memory allocated with
malloc
will cause unpredictable behavior.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804