09-11-2008 11:22 PM
Hi ccyang,
I ran the VI on my machine about 10 times without hitting the out of memory error (note: I changed the outer loop iterations to 300 instead of 500 because my machine doesn't have enough memory for 500). If you open task manager and monitor memory usage, does your LabVIEW.exe process reset to a baseline value after the VI completes? Mine starts at about 382,000 K, jumps to 617,000 K, and then resets to 382,000 K.
09-12-2008 06:07 PM
09-12-2008 06:26 PM - edited 09-12-2008 06:27 PM
Hi ccyang,
When you open the task manager, click on the "Processes" tab, not "Performance." Arrange your processes by memory usage by clicking on that column. Then, watch LabVIEW.exe's memory usage throughout the process. I tried it again today and generated these screenshots:
09-12-2008 08:33 PM
09-15-2008 10:20 PM
Hi ccyang,
What do you observe when you run the program five times? Does the memory keep creeping higher and higher? For example, let's say you start LabVIEW and the process consumes 43,000k. Then, after running and loading the program, the memory stabilizes at 630,000k. If you keep running the program, does the memory always stabilize at a higher value? If so, what is the progression (memory levels) until you receive the "out of memory" error? Does behavior change if you place a Request Deallocation.vi function on your block diagram?
09-24-2008 10:32 AM
Hi Pakman, sorry for late post to respond to your suggestion. I found that my code always take higher and higher memory. Your suggestion to use request deallocation could be good, but I am not familiar with this function. How to insert this function to my sample? Can you give me another suggestion so that I can test it? By the way, do you think the run out of memory issue has something to do with Windows XP memory management?
Thank you a lot for your suggestion again, and thanks to all who come to help this issue.
09-26-2008 12:20 AM
Hi ccyang,
You can use the Request Deallocation.vi (Programming » Application Control » Memory Control) anywhere in your top-level VI with a TRUE constant wired to it. When the VI finishes execution, it will run. However, I do not think it will do anything in this case. Your attached VI closes all references, so I do not see how memory is leaking. Are you running only that test VI in LabVIEW? Nothing else LabVIEW related is executing when you monitor memory usage, correct? Also, does modifying the outside loop iterations from 500 to 300 change behavior?
Thanks for bearing with me as we troubleshoot the situation!