LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Checking for memory leaks in LabVIEW

In a LabVIEW Intermediate class, I seem to recall that the instructor discussed how to check for memory leaks.  I suspect that I've got a leak in my application because it gets more sluggish as time passes.  It gets really bad after about 10 hours of continuously running.  How do I check for memory leaks in LabVIEW?
0 Kudos
Message 1 of 4
(3,261 Views)

The easiest way is to use the Windows task manager.  Open the task manager, sort the processes by name and keep an eye on the memory used by your application (works best if application is built into an .exe).

Many programs, depending on what they do, will peak out at a certain memory useage.  If you notice yours continually going up without ever seeming to level off, then you have a problem.

Within the editor environment, you can use the built in performance monitor fromt the tools menu to take snapshots of what is happening with each function, vi, etc.  sort these by the largest memory useage and take snapshots at regular intervals to see what is continually growing on you.

0 Kudos
Message 2 of 4
(3,245 Views)
Hi swpaulsen,

it doesn't has to be a memory leak. Maybe you are building up big arrays - this can also slowdown your app extremly.

Can you show us your vi?
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 4
(3,241 Views)
Hey swpaulsen-

In LabVIEW 7 (I believe) and above NI introduced the momory and performance profiler (go to Tools>>Profile>>Performance and Memory). This tool will let you know exactly how much memory and resources a VI or group of VI's is consuming.

Xaq
0 Kudos
Message 4 of 4
(3,210 Views)