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