Fixed the incorrect RAM size

By using GlobalMemoryStatusEx() and setting meminfo.dwlength