LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview memory leak: how to find it?

I have a top level VI that uses tabs and runs in these tabs all kinds of sub VIs that are running continuously.

 

From the windows  taskmanager I noticed how memory use increases when I run it (about 1 mb per minute).  I checked all references I opened, they're all closed. 

I checked all loops for unnecessary data operations that might fill the memory.

 

I tried running the separate VI's, but when they run by theirselve it seems al right. No change in memory, for none of them.

 

The only thing that couple the VI's are queues: I use 1 element queues with a cluster. Can the problem be related to this?

 

0 Kudos
Message 1 of 3
(3,415 Views)

Use the "desktop exectution trace toolkit"

 

Guru

Regards
Guru (CLA)
Message 2 of 3
(3,398 Views)

If you don't have the Desktop Execution Trace Toolkit, or your version of LabVIEW is too old to us it, there are a few other options:

  1. Use the profiler (Tools»Profile»Performance and Memory...) to find out where the memory is being used.  See LabVIEW help for details on how to use the profiler.  This will narrow your search.
  2. Once you have narrowed the possibilities, look for Build Array or similar nodes which are not bounded.  In older versions of LabVIEW, allocating references can have the same effect, if you do not close them.
  3. Turn on execution highlighting and your OS memory monitor (Task Manager in Windows).  Look for where memory is being allocated as you step through your code.  Do this for a couple of iterations of your loop so you can distiguish between first-time allocation and every-time allocation.
Post your code!  We can help better if we know what you are dealing with.  Good luck.
0 Kudos
Message 3 of 3
(3,361 Views)