Community
cancel
Showing results for 
Search instead for 
Did you mean: 
wujp1978
Beginner
29 Views

basic_dp_complex_dft_2d.c has memory leaks

Jump to solution
First I created a MFC Dialog project, then add "basic_dp_complex_dft_2d.c" to this project, and change "int main(void)" to "int fft_mkl(void)", then call fft_mkl in the MFC App. When the program exited, memory leaks were detected.

Some details is like
"
The thread 'Win32 Thread' (0x1648) has exited with code 2 (0x2).
First-chance exception at 0x7c812afb in testmkl_MFC.exe: 0xA1A01DB2: 0xa1a01db2.
Detected memory leaks!
Dumping objects ->
{209} normal block at 0x003BEB18, 512 bytes long.
Data: < > CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD
{208} normal block at 0x02883788, 104 bytes long.
Data: < ; > 18 EB 3B 00 00 00 00 00 00 00 00 00 00 00 00 00
Object dump complete.
The program '[3496] testmkl_MFC.exe: Native' has exited with code 2 (0x2).
"
When I added"basic_dp_complex_dft_2d.c" to a console program, and memory leaks were not found.

My MKL version is 10.3.6.
0 Kudos

Accepted Solutions
Gennady_F_Intel
Moderator
29 Views
Please try to explicitly free the memory allocated by MKL memory managements by calling
mkl_free_buffersfunction at the end of your program.

View solution in original post

2 Replies
mecej4
Black Belt
29 Views
It is possible that this is a false warning or that the memory leak is of a benign nature. I say this because I have seen similar false alarms from Valgrind and other memory leak detection programs, which often rely upon looking for certain code sequences to detect memory leaks. For example, one such memory leak checker "finds" memory leaks in any program that does Fortran I/O.
Gennady_F_Intel
Moderator
30 Views
Please try to explicitly free the memory allocated by MKL memory managements by calling
mkl_free_buffersfunction at the end of your program.

View solution in original post