From 033f759ee37cbddd2d1cbad5cf05bb296815164f Mon Sep 17 00:00:00 2001 From: Brendan McDonnell Date: Wed, 7 Aug 2019 12:07:02 -0400 Subject: [PATCH] Allow user override of KISS_FFT_MALLOC and/or KISS_FFT_FREE on non-SIMD platforms --- kiss_fft.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/kiss_fft.h b/kiss_fft.h index a6afde7..b9eed60 100644 --- a/kiss_fft.h +++ b/kiss_fft.h @@ -37,8 +37,13 @@ extern "C" { # define KISS_FFT_MALLOC(nbytes) _mm_malloc(nbytes,16) # define KISS_FFT_FREE _mm_free #else -# define KISS_FFT_MALLOC malloc -# define KISS_FFT_FREE free +/* user may override KISS_FFT_MALLOC and/or KISS_FFT_FREE */ +# ifndef KISS_FFT_MALLOC +# define KISS_FFT_MALLOC malloc +# endif +# ifndef KISS_FFT_FREE +# define KISS_FFT_FREE free +# endif #endif