Create your own memory management (i_malloc) using Intel® IPP

Intel® IPP memory functions will give you better performance compare to standard malloc functions, main reason is Intel® IPP memory functions align the memory to a 32-byte boundary for optimal performance on Intel architecture.

Now Intel® IPP user can create your own memory management function using  i_malloc. The idea behind i_malloc is that application and all libraries it links to agree on a set of four function pointers which point to the actual implementation of the malloc/realloc/calloc/free functionality.

An application can set these pointers before libraries need memory for the first time. If the application does not do that, the libraries fall back to the libc implementation automatically. The libraries must wait until the application had a chance to set the pointers before using them. The application can set these function pointers at the very beginning of the execution. This procedure is optional, and if the application does not set these pointers, the libraries point to the standard libc implementation automatically.

We have sample code which shows how to use it. It is contained in the main sample package in the folder \ipp-samples \advanced-usage\linkage\i_malloc.

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