LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I free RAM after running labview vi

"Place the Request Deallocation function in the subVI you want to deallocate memory for. When you set the flag Boolean input to TRUE, LabVIEW reduces memory usage by deallocating the data space for the subVI."

 

Please give us an example for it, it's very interested for me

0 Kudos
Message 11 of 23
(827 Views)

Is there anything in the help for the request deallocation function that is not clear to you? What kind of problems are you experiencing?

 

Most often, the "request deallocation" function is not the solution. It can actually hurt performance.

 

(You added to a 6 year old thread and many things have probably changed since.)

0 Kudos
Message 12 of 23
(824 Views)

Please help me Dear Knight of NI !

 

I'm actively using Database toolkit with LV2009 and my task is writing into PostgreSQL every 20...40 second some simple data into only table (into 10...15 columns).

 

So after download into memory my exe file I see that 65 MB is occupy my exe, and on the next day I see that my exe has become 81 MB.

 

My application is intended for 24/7

 

0 Kudos
Message 13 of 23
(818 Views)

If you're opening and closing the database connection every time that's a common result. The old connections are resident in memory or fragmented so they're hard to reuse or something. Open at program start, close at end. 🙂

 

/Y 

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 14 of 23
(814 Views)

Is there any other variant?

 

Simply I open and close my refs there where I need in my program and many times.

 

Nevertheless memory leak is growing...  I do my application for LV program rules!  Why memory is leaking?  

 

Is anybody here that did big 24/7 applications on the LV ???

 

I've never seen 

 

 

 

 

 

 

0 Kudos
Message 16 of 23
(790 Views)

That big? I've working with a 700 vi program right now, my previous project was 4000 vi's. 

The amount of memory needed is depending on what's happening and also the runtime. When running out program was some 2-300 Mb.

 

Look up Action Engines. Use one to store the database ref. Create an Open DB which opens and stores the ref. Get the ref and use it in your database query instead of opening a new one. When closing the program, use a Close ref in the AE to close it.

 

The memory is growing because you allocate a new database connection each query.

 

/Y 

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 17 of 23
(779 Views)

4000 vi's.... So many ?!  And 300 MB running out... Ohh

 

I'm very glad to see the LabVIEW professional!    In my project only 180 vi's but one is about 800 KB

 

In the matter of fact you are quite right - "The memory is growing because you allocate a new database connection each query"

 

nevertheless then rules of LabVIEW are not working

 

Thank you!

0 Kudos
Message 18 of 23
(772 Views)

Dear Yamaeda!

 

Please tell me is better or not to include into my executable NI_Database_API.lvlib  ?? 

 

0 Kudos
Message 19 of 23
(770 Views)

I dont think you need to include the .lvlib manually, if it's linked by the program it will be included.

 

Which LV rule are you referring to? They seem to work quite well. 🙂 

 

/Y 

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 20 of 23
(765 Views)