Exemplo n.º 1
0
        public static string GetFreeMemory()
        {
            long arg_0B_0         = PerformanceInfo.GetPhysicalAvailableMemoryInMiB();
            long totalMemoryInMiB = PerformanceInfo.GetTotalMemoryInMiB();

            return((arg_0B_0 / totalMemoryInMiB * 100m).ToString("##.##"));
        }
Exemplo n.º 2
0
        public static string GetFreeMemory()
        {
            var phav        = PerformanceInfo.GetPhysicalAvailableMemoryInMiB();
            var tot         = PerformanceInfo.GetTotalMemoryInMiB();
            var percentFree = phav / (decimal)tot * 100;

            return(percentFree.ToString("##.##"));
        }
Exemplo n.º 3
0
        public static string GetUsedMemory()
        {
            long    arg_0B_0         = PerformanceInfo.GetPhysicalAvailableMemoryInMiB();
            long    totalMemoryInMiB = PerformanceInfo.GetTotalMemoryInMiB();
            decimal d = arg_0B_0 / totalMemoryInMiB * 100m;

            return((100m - d).ToString("##.##"));
        }
Exemplo n.º 4
0
 public static string GetFreeMemoryMB()
 {
     return(PerformanceInfo.GetPhysicalAvailableMemoryInMiB().ToString());
 }