Intel® oneAPI DPC++/C++ Compiler Developer Guide and Reference

ID 767253
Date 11/07/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Intel's Memory Allocator Library

Intel's libqkmalloc library for fast memory allocation provides a C-level interface for memory allocation that is optimized for performance.

You can link the libqkmalloc library as a shared library only on Linux platforms for Intel® 64 architecture. This library provides optimized implementation of standard allocation routines malloc, calloc, realloc, and free, and is C99 standard compliant.

NOTE:
This library is limited to work only on Intel® processors and will redirect to standard C routines at runtime if used on non-Intel® processors.

Use Intel's Custom Memory Allocator Library

You can use the libqkmalloc library by linking directly to it or by using the LD_PRELOAD environment variable.

To ensure that the application overrides the standard library allocation routines with libqkmalloc, set the environment variable LD_PRELOAD in the command line before the application execution. This environment variable allows you to set a library path that loads before any other library (including the C runtime library). The application uses symbols from the specified library instead of symbols from the standard library.

Restrictions

This library does not support threaded code such as OpenMP* and is not thread-safe. It should not be used simultaneously from multiple threads. For the best results, this library should be used with large throughput workloads.

Product and Performance Information

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.

Notice revision #20201201