all groups > vb.net > march 2006 >
You're in the

vb.net

group:

Get Memory Usage of my Program


Re: Get Memory Usage of my Program Cerebrus
3/31/2006 3:07:11 PM
vb.net:
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.
Get Memory Usage of my Program Andreas Kammann
3/31/2006 7:13:53 PM
Hi , how can i get the current memory usage of my program (like the memory
usage of the task manager )
greetings

Re: Get Memory Usage of my Program TP
4/2/2006 11:27:57 AM
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

[quoted text, click to view]
AddThis Social Bookmark Button