Skip to content

Commit

Permalink
Call fftw_cleanup to deallocate all memory allocated by FFTW
Browse files Browse the repository at this point in the history
FFTW caches a small amount of persistent memory. The memory "leak" is
benign. Nevertheless, we call fftw_cleanup to deallocate all memory
allocated by FFTW for sanitizers.
  • Loading branch information
WeiqunZhang committed Jan 9, 2025
1 parent 731efdc commit 8662322
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Src/FFT/AMReX_FFT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ void Finalize ()
AMREX_ROCFFT_SAFE_CALL(rocfft_cleanup());
#endif
}

#if defined(AMREX_USE_FFT) && !defined(AMREX_USE_GPU)
fftw_cleanup();
#endif
}

void Clear ()
Expand Down

0 comments on commit 8662322

Please sign in to comment.