By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,238 Members | 1,485 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,238 IT Pros & Developers. It's quick & easy.

Get Memory Usage of my Program

P: n/a
Hi , how can i get the current memory usage of my program (like the memory
usage of the task manager )
greetings
Mar 31 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi,

Tim Anderson's IT Writing to the rescue ;-)

Check out this article from the aforementioned resource...

<http://www.itwriting.com/dotnetmem.php>

Regards,

Cerebrus.

Mar 31 '06 #2

P: n/a
TP
Dim c As Process = Process.GetCurrentProcess()

MessageBox.Show("Mem Usage (Working Set): " & c.WorkingSet / 1024 & " K" & vbCrLf _
& "VM Size (Private Bytes): " & c.PagedMemorySize / 1024 & " K" & vbCrLf _
& "GC TotalMemory: " & GC.GetTotalMemory(True) & " bytes", "Current Memory Usage")

If you would like to retrieve the size of the managed heaps and
other memory info see the PerformanceCounter class in the help.

-TP

Andreas Kammann wrote:
Hi , how can i get the current memory usage of my program (like the
memory usage of the task manager )
greetings

Apr 2 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.