mkl_freeBuffer() access violation exception error

mkl_freeBuffer() access violation exception error


i use mkl c++ compiler 11.0.066 and mkl10.1 and c++/clr vs2008

i use fft and conv function from mkl in multi thread realtime application (each thread exec fft and conv parallel)

but after little time usage memory go up and application crash.

with any leak detector i cant find any leakage in my code .

recently i study mkl help and find i must use mkl_FreeBuffer() after mkl function for avoidance memory leakage

but when i call mkl_freeBuffer Application crash with access violation exception.

what shoud i do?

i use 64 bit mkl

 additional library directory  -> em64t\lib 

additional dependecy -> mkl_intel_lp64_dll.lib   ;    mkl_intel_thread_dll.lib     ;  mkl_core_dll.lib

thanks for you.

9 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Do you have callstack info?


This question would probably be more appropriate for the MKL forum not the compiler forum.

Good luck,



I'll transfer this issue to MKL forum so someone from that group can address this accordingly....


Can you give us the example of your test which we can compile and check the problem with the latest version of MKL?

or you can try to evaluate the latest updates by yourself.

this is my code 

mkl_complex16*  intelForwardFft (MKL_Complex16* input,int length)


            DFTI_DESCRIPTOR *fft_handle;

           dfticreatedescriptor(&fft_handle,dfti_double,dfti_complex,1,length) ;





          return input;     ===>cursor stop here


MKL_Complex16*  Convolution(MKL_Complex16*  x,int   xlength, MKL_Complex16*  y  ,  int ylength )


          int convResLength=xlength+ylength-1;

          VSLCONVTASKPTR   task;

           VSLCONVTASKPTR*   task-ptr;

           int   iy0=0;

           int   *start=&iy0;

           MKL_Complex16* res= (MKL_Complex16*)  malloc(sizeof(MKL_Complex16)  *  convResLength);

           memset( res,  0 ,  sizeof(MKL_Complex16) * ConvResLength );

           int status;

           int   a= vslzConvNewTask1D( task_ptr , VSL_Conv_Mode_Auto , xlength , ylength ,convResLength  );

           int  b = vslzConvSetStart( task  , start);

           status  = vslzConvExec1D( task , x ,1 , y ,1, res , 1 );



           return res;


>>>but when i call mkl_freeBuffer Application crash with access violation exception>>>

Probably heap corruption or double free.

Hi iliyapolak my code exist in above comment . no double free.

only function Result ( res variable ) will be released after use. 

are you have idea?       

Without the callstack of crash is very hard to tell what has happend

Leave a Comment

Please sign in to add a comment. Not a member? Join today