Getting a process's ram usage

前端 未结 4 1973
刺人心
刺人心 2020-12-14 07:22

I have been having some trouble figuring out how exactly I get a process\'s ram usage. (How much ram it is currently consuming, not how much is reserved, or its max or min)<

4条回答
  •  忘掉有多难
    2020-12-14 08:20

    If you are purely interested in physical memory, you probably want WorkingSet64, which gives "the amount of physical memory allocated for the associated process." Understand that this value constantly fluctuates, and the value this call gives you may not be up to date. You may also be interested in PeakWorkingSet64, which gives "the maximum amount of physical memory used by the associated process."

提交回复
热议问题