# Fw: Re: Problem with volk and fftw memory alignment

**URL:** <https://www.ruby-forum.com/t/fw-re-problem-with-volk-and-fftw-memory-alignment/242167>\
**Category:** GNU Radio\
**Created:** [June 1, 2015, 10:09pm UTC](https://www.ruby-forum.com/t/fw-re-problem-with-volk-and-fftw-memory-alignment/242167 "2015-06-01T22:09:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![musicdenotation](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Post date:** [June 1, 2015, 10:09pm UTC](https://www.ruby-forum.com/t/fw-re-problem-with-volk-and-fftw-memory-alignment/242167/1 "2015-06-01T22:09:51Z")

</div>

Forgot to copy this to the list - I think the bug is fixed

Thanks for your help. I’m quite new to contibuting back into git-hosted  
projects, so forgive me if I’ve got it wrong…

The last commit I pulled from github/gnuradio is  
fb064e3c69cc7618da5c3d9c0dba2fecd84f1323

The place the problem occurs is in fft\_filter.cc - line 319 onwards  
gr\_complex \*a = d\_fwdfft-\>get\_outbuf();  
gr\_complex \*b = d\_xformed\_taps;  
gr\_complex \*c = d\_invfft-\>get\_inbuf();

```
volk_32fc_x2_multiply_32fc_a(c, a, b, d_fftsize);

```

where we call a volk routine on the outbuf and inbuf of a fft\_complex  
instance

I think the cleanest way is to fix fft.cc to use volk\_malloc - I also  
made it use its own alloc routines so there’s only one set of calls to  
volk\_malloc(). Patch attached

It seems to work - the code that previously sometimes crashed hasn’t  
done yet - but that’s not quite proof the bug is fixed

Best wishes

–David

On Sat, 30 May 2015 18:34:32 -0400  
Tom R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Tom  
> –  
> G8SQH  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
