10-31-2018 09:43 AM
Hi All,
I would like to track my application's memory usage over time, so I am using the .NET process functions to do so, however I have noticed that the Process.VirtualMemorySize, Process.PrivateMemorySize, Process.PagedMemorySize, and Process.WorkingSet64 (and non 64) all will return the same value on every call. I have attached a little vi that demonstrates the issue, and a built version. I build up a large array to increase the memory usage, and can see the increase in memory usage in the task manager when I build the array, however it is not reflected in the .NET function calls. However, if I close the references and reopen them, then call them again, the values will update. Anyone know why this is? Is there another method I need to be calling to refresh the data?
Solved! Go to Solution.
10-31-2018 10:37 AM
Calling the Process.Refresh method seems to fix the problem.
04-15-2021 09:40 AM - edited 04-15-2021 09:45 AM
@paul.r wrote:
Calling the Process.Refresh method seems to fix the problem.
this Process.Refresh method fixed my problem
Thanks
Niki