From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

source has memory leak but execution doesn't

Is this normal?

I have a source code that runs parallel loops to acquire counter measurements, analog inputs, digital pulse generation and some loops dedicated to calculations and display.

If I run my source code, the memory used by labVIEW slowly increasing. it is fluctuatiinf but there is an increasing trend.

If I run the execurable of the same program, the used memory fluctuates but stays about the same over time.

I hope someone has the "under the hood" inight to expolain what is happening here

 

I monitores the memory used in windows task manager.

Scientia est potentia!
0 Kudos
Message 1 of 6
(2,739 Views)

Sounds like the debugger is storing data and creating a leak.  Since the executable doesn't have this, no leak.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 6
(2,720 Views)

Maybe you do still have a leak, but with less memory requirements (because no IDE) it might take longer to become a problem.  I'd run long term testing over a weekend or something with Performance Monitor (built in Windows program) logging various memory statistics.

0 Kudos
Message 3 of 6
(2,709 Views)

Thanks for the advice.

I'll let the executable running over the long weekend.

Scientia est potentia!
0 Kudos
Message 4 of 6
(2,693 Views)

Thanks for your time. What you say makes sense.

 

What I don;'t understand is that, the VI analyser is dutifully warning me that a VIs has debugging enabled:

 "This VI has debugging enabled, which can reduce performance slightly.  Consider disabling debugging in the VI Properties >> Execution dialog box for this VI. "

 

On the other hand, going one by one to uncheck the enable debugginh flag for each VI is not efficient when i have 30 VIs.
Is there a way to turn this falg off for all VIs in the LV project or in an entire hierarchy?

Scientia est potentia!
0 Kudos
Message 5 of 6
(2,682 Views)

With VI Server you can do this programatically.  Open a reference to a VI based on the path, change this setting, then invoke the save.  But honestly this setting eats up very little performance, and I wouldn't expect it to take up more as the VI runs, so I don't think this is your fix.

0 Kudos
Message 6 of 6
(2,677 Views)