Using RAM memory for a Windows application

I am doing a project using the Windows VB.net Framework application. I would like to learn how to control the use of RAM, memory usage for the application, since I would not want to pinch my client computer. Are there any codes available for captures? I searched around but could not find.

thank

+4
source share
1 answer

What have you tried? It should work something like this:

Dim x As Process = Process.GetCurrentProcess()

Dim inf As String
inf = "Mem Usage: " & x.WorkingSet / 1024 & " K" & vbCrLf _
    & "Paged Memory: " & x.PagedMemorySize / 1024 & " K"

MessageBox.Show(inf, "Memory Usage")

Feel free to adapt to your needs.

+5
source

Source: https://habr.com/ru/post/1569266/