Poll C# app's memory usage at runtime?

后端 未结 5 1095
傲寒
傲寒 2020-12-14 02:42

I have an app that, while running, needs to poll its own memory usage. It would be ideal if it could list out the memory usage for each object instantiated. I know this ca

5条回答
  •  [愿得一人]
    2020-12-14 03:20

    Process proc = Process.GetCurrentProcess();
    Logger.Info(proc.PeakWorkingSet64/1024 + "kb");
    

提交回复
热议问题