LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to use task manager to detect memory leaks?

Since 3d arrays have to be rectangular and contiguous, it may be your issue. An arry of cluster of arrys may help since the buffer for each sub-array don't have to be contiguous (I believe).

The queues may help also since each item in the queue is stored in unique buffers.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 11 of 12
(690 Views)
It is often useful to walk through your code with execution highlighting on while watching the task manager to find out exactly where you are "leaking" memory.  It is easy to fragment memory using LabVIEW, since many of the array operations (e.g. build array) can do this.  You can avoid this issue by preallocating arrays to their final size and then using subsets when you need them (you typically get performance gains, as well).

Queues are an excellent way to pass or store array data because they do not automatically make a copy of array inputs.  This is why they outperform most other safe methods (e.g. action engines) in this use case.

A 1024x1024 array is really not that big.  As Ben said, you can handle much larger sizes.  For LabVIEW 8.0+, this is about 800GBytes.  For previous versions, it is about 1.1GBytes.  LabVIEW 8.5 is large memory aware, so you should be able to use over 3GBytes when running on Vista64.  I have never tried this so cannot tell you how well it works.  You can get more details and maybe some tips that will help by reading the tutorial Managing Large Data Sets in LabVIEW.
0 Kudos
Message 12 of 12
(668 Views)