C# Get used memory in %

前端 未结 4 1227

I\'ve created a performancecounter that can check the total memory usage in %, but the problem is that it doesn\'t give me the same value as in task manager shows me. for ex

4条回答
  •  情深已故
    2020-12-07 21:03

    You can use "show description" on the bottom of Performance monitor. To quote

    % Committed Bytes In Use is the ratio of Memory\Committed Bytes to the Memory\Commit Limit. Committed memory is the physical memory in use for which space has been reserved in the paging file should it need to be written to disk. The commit limit is determined by the size of the paging file. If the paging file is enlarged, the commit limit increases, and the ratio is reduced). This counter displays the current percentage value only; it is not an average.

    Soo yes PM uses the paging file, while TM uses actual RAM.

提交回复
热议问题