On 02/27/2014 02:06 AM, Michael Berman wrote:
> I have figured out what was happening for me.  As I was deprecating the
> source code to put out publicly, I noticed something that looking at now
> was a glaring red flag.  Inside my OOT, I was copying the GNURadio
> buffered data into a vector for computation on the large set of data.  I
> knew that it was going to be large, and trying to save space on the
> stack, I made the local variable static.  This, of course, made all
> instances of the object have the same local buffer in memory, and I
> truly did have a classic multi-threaded problem on my hands.  In my
> case, Instead of dealing with the overhead needed to guard the common
> resource, I simply removed the static keyword and allowed the memory to
> allocated on the stack.

Hah, a classic case of premature optimization :)
Glad you figured it out.

Martin


_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to