如何以编程方式在.NET中测量当前进程的总内存消耗? [英] How to measure the total memory consumption of the current process programmatically in .NET?
本文介绍了如何以编程方式在.NET中测量当前进程的总内存消耗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在.NET中以编程方式测量当前进程的总内存消耗?
How to measure the total memory consumption of the current process programmatically in .NET?
推荐答案
请参阅此进一步尝试
Process currentProcess = System.Diagnostics.Process.GetCurrentProcess();
long totalBytesOfMemoryUsed = currentProcess.WorkingSet64;
这篇关于如何以编程方式在.NET中测量当前进程的总内存消耗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文