예제 #1
0
        public static string GetUsedMemory()
        {
            var phav            = PerformanceInfo.GetPhysicalAvailableMemoryInMiB();
            var tot             = PerformanceInfo.GetTotalMemoryInMiB();
            var percentFree     = phav / (decimal)tot * 100;
            var percentOccupied = 100 - percentFree;

            return(percentOccupied.ToString("##.##"));
        }
예제 #2
0
 public static string GetTotalMemory()
 {
     return(PerformanceInfo.GetTotalMemoryInMiB().ToString());
 }
예제 #3
0
 public static string GetTotalMemory() => PerformanceInfo.GetTotalMemoryInMiB().ToString();