Our program analyzes several images every few seconds. Each image is processed in its own thread. The threads are ordinary Windows threads. MKL functions are used in the process. We used a memory leak detection tool to find leaks in the application (Memory Validator by Software Verification). The tool revealed a leak in calls to MKL vsMul function (32 bits for each image). The call stack is as follows:
vsMul->mkl_vml_kernel_GetTTableIndex->_vmlGetThreadLocalData
I found a note in Intel documentation (https://software.intel.com/en-us/mkl-windows-developer-guide-avoiding-me...) and accordingly I tried to use both the mkl_disable_fast_mm function and the MKL_DISABLE_FAST_MM environment variable. None of them helped to eliminate the memory leak.
How can I overcome this memory leak problem?