Process Memory Size - Different Counters

前端 未结 7 2042
闹比i
闹比i 2020-12-30 04:46

I\'m trying to find out how much memory my own .Net server process is using (for monitoring and logging purposes).

I\'m using:

Process.GetCurrentProc         


        
7条回答
  •  余生分开走
    2020-12-30 05:01

    OK, I found through Google the same page that Lars mentioned, and I believe it's a great explanation for people that don't quite know how memory works (like me).

    http://shsc.info/WindowsMemoryManagement

    My short conclusion was:

    • Private Bytes = The Memory my process has requested to store data. Some of it may be paged to disk or not. This is the information I was looking for.

    • Virtual Bytes = The Private Bytes, plus the space shared with other processes for loaded DLLs, etc.

    • Working Set = The portion of ALL the memory of my process that has not been paged to disk. So the amount paged to disk should be (Virtual - Working Set).

    Thanks all for your help!

提交回复
热议问题