Get RAM system size
问题 I would like to know how can I get the size of my RAM through C++ (on Windows 7). 回答1: Use GetPhysicallyInstalledSystemMemory to retrieve the amount of RAM that is physically installed on the computer. (Note that this requires Windows Vista SP1 or later. The function is not available on earlier versions of the Windows operating system.) The remarks on MSDN say: The GetPhysicallyInstalledSystemMemory function retrieves the amount of physically installed RAM from the computer's SMBIOS firmware