次に memtest86 をインストールします。
$ wget http://www.memtest86.com/memtest86-3.2.tar.gz $ tar xvzf memtest86-3.2.tar.gz
$ cd memtest86-3.2/
$ make
$ make install
dd <memtest.bin >/dev/fd0 bs=8192
11+1 records in
11+1 records out
94356 bytes (94 kB) copied, 3.53392 seconds, 26.7 kB/s
#include <cstdio>
typedef long long LONG;
int main()
{
printf("sizeof(LONG)=%d\n", sizeof(LONG));
LONG num = 0;
LONG cnt = (LONG)(1) << 32;
for (LONG i = 0; i < cnt; ++i)
++num;
printf("num = %lld\n", num);
return 0;
}
Pentium4 2.8EB マシンの場合
> sizeof(LONG)=8
> num = 4294967296
> real 0m46.253s
> user 0m46.089s
> sys 0m0.163s
Athlon 3800+ 64X2 マシンだと
> sizeof(LONG)=8
> num = 4294967296
> real 0m11.369s
> user 0m11.369s
> sys 0m0.000s