[LAD] malloc in fftw

cal cal at graggrag.com
Wed Apr 7 11:25:10 UTC 2010


Maarten de Boer wrote:
> Hi,
> 
> I suppose that many of you are or might be using fftw for real-time audio processing, and I think the following information may be of your interest.
> 
> I just came to realize that fftw_execute calls malloc. This happens even though you create a 'plan' where you pass fftw_malloc preallocated input and output buffers.
> [ ... ]
> I wrote the fftw developers and they confirmed the memory allocation takes place. They suggested the following:
> 
>> Try planning with the undocumented flag FFTW_NO_BUFFERING, which will
>> prevent the use of malloc() in common cases.  This is not
>> foolproof---some transforms are very hard to do without additional
>> buffers, but if all you are trying to do is vanilla out-of-place 1D
>> transforms without large prime factors it should work.

Very interesting ... yoshimi still works with it in play, though it'll take a good
deal more testing (and some thinking) to see if it makes a difference in my case.
Thanks for that!

cheers, Cal




More information about the Linux-audio-dev mailing list