Developer Reference

  • 2020
  • 07/15/2020
  • Public Content
Contents

Malloc

Allocates memory aligned to 64-byte boundary.

Syntax

Case 1: Memory allocation for blocks of 32-bit length
Ipp8u* ippsMalloc_8u(int
len
);
Ipp16u* ippsMalloc_16u(int
len
);
Ipp32u* ippsMalloc_32u(int
len
);
Ipp8s* ippsMalloc_8s(int
len
);
Ipp16s* ippsMalloc_16s(int
len
);
Ipp32s* ippsMalloc_32s(int
len
);
Ipp64s* ippsMalloc_64s(int
len
);
Ipp32f* ippsMalloc_32f(int
len
);
Ipp64f* ippsMalloc_64f(int
len
);
Ipp8sc* ippsMalloc_8sc(int
len
);
Ipp16sc* ippsMalloc_16sc(int
len
);
Ipp32sc* ippsMalloc_32sc(int
len
);
Ipp64sc* ippsMalloc_64sc(int
len
);
Ipp32fc* ippsMalloc_32fc(int
len
);
Ipp64fc* ippsMalloc_64fc(int
len
);
Case 2: Memory allocation for platform-aware functions
Ipp8u* ippsMalloc_8u_L(IppSizeL
len
);
Ipp16u* ippsMalloc_16u_L(IppSizeL
len
);
Ipp32u* ippsMalloc_32u_L(IppSizeL
len
);
Ipp8s* ippsMalloc_8s_L(IppSizeL
len
);
Ipp16s* ippsMalloc_16s_L(IppSizeL
len
);
Ipp32s* ippsMalloc_32s_L(IppSizeL
len
);
Ipp64s* ippsMalloc_64s_L(IppSizeL
len
);
Ipp32f* ippsMalloc_32f_L(IppSizeL
len
);
Ipp64f* ippsMalloc_64f_L(IppSizeL
len
);
Ipp8sc* ippsMalloc_8sc_L(IppSizeL
len
);
Ipp16sc* ippsMalloc_16sc_L(IppSizeL
len
);
Ipp32sc* ippsMalloc_32sc_L(IppSizeL
len
);
Ipp64sc* ippsMalloc_64sc_L(IppSizeL
len
);
Ipp32fc* ippsMalloc_32fc_L(IppSizeL
len
);
Ipp64fc* ippsMalloc_64fc_L(IppSizeL
len
);
Include Files
ipps.h
Flavors with the
_L
suffix:
ipps_l.h
Domain Dependencies
Headers:
ippcore.h
,
ippvm.h
Libraries:
ippcore.lib
,
ippvm.lib
Parameters
len
Number of elements to allocate.
Description
This function allocates memory block aligned to 64-byte boundary for elements of different data types.

Example

The following example shows how to use the
ippsMalloc_8u
function:
void func_malloc(void) { Ipp8u* pBuf = ippsMalloc_8u(8*sizeof(Ipp8u)); if(NULL == pBuf) // not enough memory ippsFree(pBuf); }
Return Values
The return value of
ippsMalloc
is a pointer to an aligned memory block. If no memory is available in the system, then the
NULL
value is returned. To free this block, use the
ippsFree
function.

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