此文档分别以2G和8G内存的测试机器运行脚本、装Centos7.6系统。
1、#Centos/RHEL安装并运行脚本命令:
yum install wget -y
yum groupinstall "Development Tools" -y
wget https://raw.githubusercontent.com/FunctionClub/Memtester/master/memtester.cpp
gcc -l stdc memtester.cpp
./a.out
2、#Ubuntu / Debian安装并运行脚本命令
apt-get update
apt-get install wget build-essential -y
wget https://raw.githubusercontent.com/FunctionClub/Memtester/master/memtester.cpp
gcc -l stdc memtester.cpp
./a.out
3、脚本执行情况
这台自营2G内存测试机最大内存为2430MB
这台8G内存测试机最大内存为8140MB