A Andreas Kammann Mar 31, 2006 #1 Hi , how can i get the current memory usage of my program (like the memory usage of the task manager ) greetings
Hi , how can i get the current memory usage of my program (like the memory usage of the task manager ) greetings
C Cerebrus Apr 1, 2006 #2 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.
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.
T TP Apr 2, 2006 #3 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
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