LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LV App Memory

We have a couple of large LV apps that run under Win9x/2k/XP environments.
We're using LV 7 for development. When we launch the application (either
built .exe or running within LV development environment) and watch the
windows task manager, we see the app's memory usage increase. At the end of
some settling time it generally levels out to something around 120 MB. Now
after some arbitrary time we minimize the application's window, the memory
usage will drop to something around 20 MB. Ok, I would expect that, but
when restoring the window, the mem usage does not increase back up to the
original level, it maybe only goes up by another 10% of the original. Is
this expected? Should we be programmatically minimizing/restoring the app
to reduce the memory
usage? Perhaps there is something that could use the
new "Request Deallocation" function? But where to put it?

Thanks for any insight!

James
0 Kudos
Message 1 of 5
(2,909 Views)
Hi,

Perhaps it has something to do with the default control and indicator
values? If there are controls (like large arrays) that are by default filled
with data, I can imagine that lv doesn't release the data until certain UI
actions (like minimization), even if they are cleared by the program. Might
be worth a try.

Regards,

Wiebe.


"James Brunner" wrote in message
news:40475b5e@newsgroups....
> We have a couple of large LV apps that run under Win9x/2k/XP environments.
> We're using LV 7 for development. When we launch the application (either
> built .exe or running within LV development environment) and watch the
> windows task manager, we see the app's memory usage increase. At the end
of
> some settling time it general
ly levels out to something around 120 MB.
Now
> after some arbitrary time we minimize the application's window, the memory
> usage will drop to something around 20 MB. Ok, I would expect that, but
> when restoring the window, the mem usage does not increase back up to the
> original level, it maybe only goes up by another 10% of the original. Is
> this expected? Should we be programmatically minimizing/restoring the app
> to reduce the memory usage? Perhaps there is something that could use the
> new "Request Deallocation" function? But where to put it?
>
> Thanks for any insight!
>
> James
>
>
Message 2 of 5
(2,909 Views)
Hi Wiebe and James,

I tend to believe you (Weibe)are on the right track with this line of thought. maybe the display has default values that are large but are over written when the app starts. The minimizing maybe clearing the "un-do" buffer.

THat is just my first thought,

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 5
(2,909 Views)
> We have a couple of large LV apps that run under Win9x/2k/XP environments.
> We're using LV 7 for development. When we launch the application (either
> built .exe or running within LV development environment) and watch the
> windows task manager, we see the app's memory usage increase. At the end of
> some settling time it generally levels out to something around 120 MB. Now
> after some arbitrary time we minimize the application's window, the memory
> usage will drop to something around 20 MB. Ok, I would expect that, but
> when restoring the window, the mem usage does not increase back up to the
> original level, it maybe only goes up by another 10% of the original. Is
> this expected? Should we be programmatically minimizing/restoring the app
> to
reduce the memory usage? Perhaps there is something that could use the
> new "Request Deallocation" function? But where to put it?
>

I would expect that after opening the window again, you will see the
memory size climb again to its steady state. This number by the way is
influenced by several things, but is highly influenced by the OS memory
allocation stratey. Also, at some points, the OS can harvest pages of
virtual memory address range from an app. My guess is that they are
leaving the freed pages in the app till you minimize.

If you want to use the Request Deallocation, the best usage is to place
it in subVIs that are use enough memory to want it back, and are called
seldom enough that the cost of deallocation and reallocation on next
call isn't a problem. Put it anywhere within that diagram and it will
take effect during the subVI return.

Greg McKaskle
0 Kudos
Message 4 of 5
(2,909 Views)
All -
Good ideas. I'm going to try to get something pared down that still
demonstrates the issue, and I'll post. Thanks for the comments.

James

"Ben" wrote in message
news:5065000000050000005A640100-1077587809000@exchange.ni.com...
> Hi Wiebe and James,
>
> I tend to believe you (Weibe)are on the right track with this line of
> thought. maybe the display has default values that are large but are
> over written when the app starts. The minimizing maybe clearing the
> "un-do" buffer.
>
> THat is just my first thought,
>
> Ben
0 Kudos
Message 5 of 5
(2,909 Views)