Artemis.Modules.Effects.WindowsProfile.PerformanceInfo.GetTotalMemoryInMiB C# (CSharp) Method

GetTotalMemoryInMiB() public static method

public static GetTotalMemoryInMiB ( ) : long
return long
        public static long GetTotalMemoryInMiB()
        {
            var pi = new PerformanceInformation();
            if (GetPerformanceInfo(out pi, Marshal.SizeOf(pi)))
                return Convert.ToInt64(pi.PhysicalTotal.ToInt64()*pi.PageSize.ToInt64()/1048576);
            return -1;
        }