Home
 
 
SImg
Features
Screenshots
 
Other
projects

jsMovie
lx200ctl
eq6update-config
pgettext
xetoxe2
ramtest
 
Download
 
Links
 
 

ramtest

What is ramtest?

ramtest is a memory test program for DOS. It is freely distributed under the GPL. ramtest uses varying random patterns for memory testing and performs "up/up", "up/down", "down/up", "down/down" tests in order to detect unusual errors.

Download

ramtest.zip

Usage

ramtest <start> <stop> [report file [outer loop [inner loop[blocksize]]]]
   start        where to start in MB
   stop         where to stop MB (last byte tested is stop*1M-1)
   report file  there errors are reported
   outer loop   number of outer loops (see below)
   inner loop   number of inner loops (see below)
   blocksize    size of block tested in inner loop (see below)

Parameters start and stop are required. (In order to test the memory above 64MB.) Other parameters are optional. Errors are logged in the report file.

Ramtest does not run in virtual mode. Please be careful with smartdrv or other disk cache programs.

Ramtest uses varying random test patterns. With constant patterns it would be possible that the test values are stored in or read from the wrong address and the program does not recognize it.

Ramtest tries to find out whether an error is a read error or a write error. It also tests whether caches are enabled. To do this the performance in [start, stop) and in [start, start+8k) are measured. If caches are enabled the second value should be significantly greater than than first (theoretical). After the memory test ramtest shows the system performance. This is not the real memory performance because the random generator needs some computation time. These 3 values are a good benchmark for your system. Here are some examples:

Cyrix 6x86 100MHz, Gigabyte 586 ATEP, 64MB EDO RAM
  Cache disabled: 10.9MB/s  11.1MB/s   4.3MB/s
  Cache enabled:  87.3MB/s  181.5MB/s  55.1MB/s

PII 400MHz, Gigabyte BXDS, 128MB SDRAM (PC100)
 Cache disabled:   6.7MB/s     6.6MB/s     1.7MB/s  (!)
 Cache enabled:  324.5MB/s   350.7MB/s   110.3MB/s  (!)

I added some security features. For example overwriting of used memory (via XMS driver) should be impossible. Ramtest fails if CPU is in virtual mode (for example if emm386 is running). With the small utility meminfo you can find out which memory is unused an can be tested.

How it works ?

(in something like pascal)
 procedure test(a);
 begin
 b:=random2;
 c1:=memory[a] xor b;
 c2:=memory[a] xor b;
 c3:=memory[a] xor b;
 if (c1<>c2) or (c1<>c3) 
      then write('memory error (r/(w)) at:', a ... );   { probably a read error } 
   else if c1<>0 
      then write('memory error (w) at:', a);            { write error }
 { detection whether write or read errors only works if cache are disabled }
 end;

 begin
 randomize1(0);             { two equal independent pseudo }
 randomize2(0);             { random number generators } 
 for i:=1 to outer_loop do
  begin
  bt:=start*1M;
  repeat
   et:=bt+blocksize*1M;
   if et>stop then et:=stop;

   for j:=1 to inner_loop do           { "up test" }
    begin
    for k:=bt to et-1 do
     memory[k]:=random1;
    for k:=bt to et-1 do
     test(k);
    end;

   for j:=1 to inner_loop do           { "down test" }
    begin
    for k:=et-1 downto bt do
     memory[k]:=random1;
    for k:=et-1 downto bt do
     test(k);
    end;

   for j:=1 to inner_loop do           { "up/down test" }
    begin
    for k:=bt to et-1 do
     memory[k]:=random2r;              { reverse pseudo random number generator }
    for k:=et-1 downto bt do
     test(k);
    end;

   for j:=1 to inner_loop do           { "down/up test" }
    begin
    for k:=et-1 downto bt do
     memory[k]:=random2r;              { reverse pseudo random number generator }
    for k:=bt to et-1 do
     test(k);
    end;

   bt:=et+1;
   until bt>stop;
  end.

Files

The ZIP-archive ramtest.zip contains
files         file list
readme        README
makefile      Makefile
copying       GPL
ramtest.asm   main source for ramtest
meminfo.asm   main source for meminfo
numstr.inc    routines for string conversion
promode.inc   routines for promode
xms.inc       routines for xms support
ramtest.com   ramtest executable
meminfo.com   meminfo executable (shows which memory areas are used)


[Home]  [Download]    email
© Copyright 1999-2004 by Stefan Ziegenbalg. All rights reserved.