本文介绍了如何获得可用内存,或在C#中使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎样才能获得应用程序使用可用的RAM或存储?

How can I get the available RAM or memory used by the application?

推荐答案

您可以使用:

Process proc = Process.GetCurrentProcess();

要获得当前进程,并使用:

To get the current process and use:

proc.PrivateMemorySize64;

要获得专用内存使用情况。欲了解更多信息看。

To get the private memory usage. For more information look at this link.

这篇关于如何获得可用内存,或在C#中使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-27 07:58
查看更多