how to find memory size occupied for my application in vb,net ?

I am developing application in vb.net. my application has 20 forms.  this application is now running.  while this application is running , I want to find that  how many  size has ocuupied in memory  for my application ?
how to find it ?
tamilsoftAsked:
Who is Participating?
 
Miguel OzSoftware EngineerCommented:
Task manager is not reliable, it does not show the real memory usage. You are better off using Process Explorer:
http://technet.microsoft.com/en-us/sysinternals/bb896653

If you are interested in keep track of this value in production as well, you need to log the memory usage(or show it in a label in your app updated by a timer) using:
http://msdn.microsoft.com/en-us/library/system.diagnostics.process.privatememorysize64.aspx#Y648

Sample code
Dim myProcess As Process = Process.GetCurrentProcess()
Console.WriteLine("  PagedMemorySize64: {0}", myProcess.PagedMemorySize64)


0
 
Paul MacDonaldDirector, Information SystemsCommented:
If you start the Task Manager (right-click on the task bar) the processes tab will show you your .exe and it's memory usage.
0
 
Bob LearnedCommented:
I would think that Environment.WorkingSet is what you are looking for.

Environment.WorkingSet Property
http://msdn.microsoft.com/en-us/library/system.environment.workingset.aspx
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.