#include void fftw_malloc_print_minfo(int); void fft_test(double *in, int N) { fftw_complex* out; fftw_plan planF, planB; out = (fftw_complex*) fftw_malloc(sizeof(fftw_complex) * N); if (out == NULL) return ; planF = fftw_plan_dft_r2c_1d (N, in, out, FFTW_ESTIMATE); if (planF == NULL) return; planB = fftw_plan_dft_c2r_1d (N, out, in, FFTW_ESTIMATE); if (planB == NULL) return; fftw_execute(planF); fftw_execute(planB); fftw_destroy_plan(planF); fftw_destroy_plan(planB); fftw_cleanup(); fftw_free(out); out=NULL; } int main() { #define S 1024 double x[S]; int icol; int i; for (i = 0; i < S; ++i) x[i] = 0.0; for (icol = 0; icol < 100; ++icol) fft_test(x, S); fftw_malloc_print_minfo(2); return 0; }