LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Memory leak in enque and deque functions when using on PDA.

Hi! List,
In my application I am acquiring continuous data from the serial port.I use two different que in the application.First que as a buffer to enque the elements read from the serial port and second que to pick 25 elements from the buffer que at a time and plot it.
When executing the VI on windows it works absolutely great but on PDA after a while it returns an error "unable to allocate memory" application failed. I have even taken care of the storage memory and program memory. Seems like there is a memory leak in the enque or deque functions? Any one has encountered this problem before?
The second question is regarding the graph. As I am plotting 25 points on the graph and then updating one point every
time to make it appear as the continuous data acquistion. Again it works perfectly on windows but the behaviour is different on the PDA. The X axis keeps changing upto 50 and then reduces back to 25. It seems like that when I am using two different queue, PDa is picking the elements from the Buffer que and according changes the x axis. I have checked the values of the #of elements for buffer que and the graph plotting que but as the buffer ques has more than 25 elements or maybe less at time, that is what the graph uses for the x asis and the values of # of elements are same in both the indicator(i.e. of buffer que).
Any reason why is enque and deque behaving in this manner for PDA? Is there a bug in these functions?
TIA
0 Kudos
Message 1 of 3
(3,507 Views)
Hi Rachana,

Its been a couple days with no other answers, so I will try to help a bit.

I do not own a PDA so I can not test this myself.

Can you put together a stripped down VI that uses queues that demonstates the issue?

Another thing that I have seen in LV RT on cFP2XXX's is the nature of the queues elements themselves.

Let me explain:
If the queues element is a cluster for example, you could have a string as part of the cluster. Since the string size could be different for different queue elements, the memory storage req's can change. I have also noticed that once new memory is allocated to accomodate an increased storage requirement it is not given up (without starting all over).

I admit this does not answer your question directly, but that is
all I have to share at the moment.

Trying to help,

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 3
(3,507 Views)
Hello Rachana,
Please post the stripped down VIs; I could test it on a couple of PDAs for the behaviour. Did not come accross it myself in my program.
0 Kudos
Message 3 of 3
(3,507 Views)