From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

Labview Out of Memory issue does not happen if I minimize GUI, WHy?

I have noticed that when I run my labview App it is hogging a lot of RAM but if I minimize GUI usage drops to normal value.

 

Any thoughts?

 

Thanks

tom

0 Kudos
Message 1 of 3
(2,822 Views)

Well I would guess your GUI is doing a lot of stuff... Please include a Snippet of your code, or attach your VIs, so that we can better assist you. There is no LabVIEW information here for us to decipher.

 

By the way, you can attach images here, so no need to attach a Word document that includes images. It's much easier to see the images as part of the post.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 2 of 3
(2,818 Views)

Windows has something called a working set of memory for each application. Basically this is the actual amount of memory currently mapped into physical memory. Windows task manager does show this amount, eventhough it is quite misleading.

 

When you minimize a window, Windows calls SetProcessWorkingSet() for the actual process and this swaps out memory from the physical memory to the swap space on the harddisk. The application still owns that memory but the Windows task manager won't show it anymore, since it only displays the working set memory, not the total amount of allocated memory.

 

If an application has a memory leak, this might seem to solve the problem, but it isn't a solution, just a dirty workaround. The memroy leak being a forgotten memory pointer won't be accessed anymore and therefore the virtual memory manager will mark it as canditdate for swapping out to disk. And since it will be never accessed again, it will stay swapped out. But if you wait long enough your swap space will fill up too and then you run out of memory anyhow, eventhough task manager might show a very moderate size of memory allocated to your app.

 

 

 

Rolf Kalbermatter
My Blog
Message 3 of 3
(2,795 Views)