如何在 C# 中获得可用或使用的内存 [英] How to get memory available or used in C#
本文介绍了如何在 C# 中获得可用或使用的内存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何获取应用程序使用的可用 RAM 或内存?
How can I get the available RAM or memory used by the application?
推荐答案
您可以使用:
Process proc = Process.GetCurrentProcess();
获取当前进程并使用:
proc.PrivateMemorySize64;
获取私有内存使用情况.有关详细信息,请查看 this链接.
To get the private memory usage. For more information look at this link.
这篇关于如何在 C# 中获得可用或使用的内存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文