my code is like this:
#include \<stdio.h\>
\#include "ipp.h"
int main(){
int specSize = 0, bufferSize = 0, specBufferSize = 0;
int order = 12;
IppStatus status = ippsFFTGetSize_C_64fc(order,IPP_FFT_DIV_INV_BY_N,ippAlgHintNone,&specSize,&specBufferSize,&bufferSize);
IppsFFTSpec_C_64fc* spec = (IppsFFTSpec_C_64fc*)ippsMalloc_64fc(specSize);
Ipp8u* pSpecBuffer = (Ipp8u*)ippsMalloc_8u(specBufferSize);
Ipp8u* pBuffer = (Ipp8u*)ippsMalloc_8u(bufferSize);
status = ippsFFTInit_C_64fc(&spec,order,IPP_FFT_DIV_INV_BY_N,ippAlgHintNone,pSpecBuffer,pBuffer);
ippsFree(spec);
ippsFree(pSpecBuffer);
ippsFree(pBuffer);
}
The return result of ippsFFTInit_C_64fc
is normal, which means status==0
. However, when it comes to ippsFree
, a segmentation fault occurs:
\*\*\* Error in './IPPTest': free(): invalid next size (normal): 0x0000000000890630 \*\*\*
How should I fix this?
I found that when order
is less than 11, the code works. What's more, if I deleted all ippFree
, the code still works even when order is larger than 11. Therefore, I believe that this is not caused by insufficient memory space.