discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] Re: Lots of mallocs in my gnuradio block ... is it sa


From: John Andrews
Subject: [Discuss-gnuradio] Re: Lots of mallocs in my gnuradio block ... is it safe?
Date: Sun, 17 Oct 2010 22:01:41 -0700

haha! I just realized that this is a great deal of memory used. 250*2046*4.

I am so dumb. :) 

I guess I will have to calculate this on each iteration i use that data.



On Sun, Oct 17, 2010 at 9:08 PM, John Andrews <address@hidden> wrote:
Hi,
I am writing the code for a gnuradio block and I use a lot of dynamic memory allocation. The code isn't finished yet but I thought I would ask this question anyways. For an idea this is how the mallocs look like.

1. (204 + 5 + 204) gr_complex arrays of size 2046 each
2. 1 double array of size 2046

The reason why I have this is most of the data allocated in these arrays is reused and I don't have to calculate it again and again. i thought having this data ready when the block is initialized will speed up the processing.

Being pessimistic programmer I am circumspect about my method. What are your thoughts?

Thanks,
John


reply via email to

[Prev in Thread] Current Thread [Next in Thread]