Changes
=======

v.2.5 1999/11/16 Charles Cazabon <memtest@discworld.dyndns.org>
	-Added an expermental/development version.  This release version is
		the first release to have come from that track.
	-Added a logging option (-l or --log).  Logs to memtest.log.  Log is
		currently a little messy, because of the \b sequences in the stderr
		output.  Will clean up later.
	-Handles commandline a little more flexibly now.
	-Changed 'solid 1s' and 'solid 0s' tests to a single test which alternates
		between the two several times.  Helps catch marginal memory with
		inter-word bit dependencies.
	-Added a "Bit Flip" test -- tries 0-1-0... or 1-0-1... cycles on each bit
		individually per 32-bit word.  Helps catch marginal memory with
		inter-bit dependencies.
	-Updated documentation.
	
v.2.41 1999/11/15 Charles Cazabon <memtest@discworld.dyndns.org>
	-Minor code and packaging updates.

v.2.4 1999/11/11 Charles Cazabon <memtest@discworld.dyndns.org>
	-Fixed a bug in the memory allocation algorithm -- it was decrementing by
		one MB after each unsuccessful malloc attempt, rather than the graduated
		amounts I had intended.
	-Removed some duplicated code in two of the testing routines.
	-Submitted an announcement to freshmeat.net out of curiosity.

v.2.3 1999/11/08 Charles Cazabon <memtest@discworld.dyndns.org>
	-Added code to cleanly exit after getting a signal.  Also ignores SIGHUP.
	-Moved printing of summary information to separate function, so it could be
		printed after receiving a signal.
	-Clarified documentation, especially for beginners.
	-Added a BUGS file.
	-Fixed a bug I introduced when I removed the walkbits data array; the
		walking zeroes data patterns were being generated incorrectly.
	-Main inspiration was the fact that this package is actually being
		downloaded on a fairly regular basis.

v.2.2 1999/10/28 Charles Cazabon <memtest@discworld.dyndns.org>
	-Some code cleanups and output changes.
	-Added solid ones and solid zeroes tests.
	-If memory allocation fails, it will try again with a smaller allocation
		until it either succeeds, or cannot allocate 1MB.
	-Moved the changes record out of the source to this file and reorganized
		it.

v.2.1 1999/10/25 Charles Cazabon <memtest@discworld.dyndns.org>
	-Code cleanups.  Moved tests to separate functions and separate source file.
		Consolidated semi-duplicated code by adding a mode bit parameter to
		some tests (checkboard, walking bits).  Cleaned up logic of main routine
		by invoking tests from inside loop. Consolidated error output code in
		separate function.
	-Gave the code a basic linting.  Should compile cleanly under gcc with the
		-Wall option now.  Formerly gave tons of non-fatal warnings.
	-Separated source into two headers and two C source files to reduce file
		length.  Created a makefile, etc.  Looks like I've got a small package
		to maintain now.
	-Corrected checkerboard tests to invert the bit pattern every other word32.
	-Added error counts and total runtime reporting.
	-Broke some long lines.
	-Rewrote walking bits tests to remove array data.  Also changed to walk the
		bit back down the word32 after walking it up.

v.2.02 1999/10/22 Charles Cazabon <memtest@discworld.dyndns.org>
	-Added a second, inverted, checkerboard test.
	-Added optional commandline parameter to limit number of runs.
	-Bah.  Changed the output back to stderr.  Liked the in-progress indicators
		too much.

v.2.0 1999/10/22 Charles Cazabon <memtest@discworld.dyndns.org>
	-Version 2 release, based on Simon Kirby's original memtest.
	-Changes made include:
	-will attempt to mlock () pages into memory, to test more memory, rather
		than allowing the machine to swap and test the same locations multiple
		times.  This requires root privileges; it will default to its previous
		behaviour if it cannot mlock its memory.
	-memory accesses are now all done in 32-bit words, significantly speeding
		the process.
	-added tests (checkerboard, walking ones, walking zeroes) which help catch
		cases where a bad bit is not simply hardwired high or low, but rather
		is dependent on surrounding bits in either the same word, or the
		previous and successive words.  Also added sequential increment and
		block sequential tests.
	-cleaned up output format.  Introduced concept of 'runs' versus individual
		tests.
	-program will not exit at first error.  It will abort the current test and
		continue with the next test in the run.
	-errors are logged to stderr, most other output goes to stdout.
		Should make it easier to look through a captured log of an overnight
		test run.  Unfortunately, stdout is buffered, so the in-progress updates
		for recursive tests aren't as visible.  Can be changed if necessary.
	-made all in-test memory references volatile.  Should help keep compilers
		from optimizing away the tests.  Don't think this will help with the
		hardware caching issues, though.
	-displays time in seconds taken for each run.
	-re-indented the code, changing it from k&r/Berkeley style to my personal
		preferences.  YMMV.
	-code is messy, but works.  It was a quick hack.



Original v.1.0 release comments by Simon Kirby
==============================================

1999/10/21 Simon Kirby <sim@stormix.com> <sim@neato.org>

This program will run on an active machine, but will test only the
memory that the kernel maps to the process.  Make sure you specify
at least enough memory (in 2^20 MB) to cross all of your memory
chips, unless you want to keep a larger amount of memory
available.  Note that the amount of time required to complete one
test run is proportional to the amount of memory being tested.
This program does not take in to account cache issues or anything
similar, but it still seems to do the trick, and thus I have
decided not cleaned up the cut-and-paste coding technique I used
to create it very quickly several years ago, fearing that I may
break its strange powers. :)
I hope others can find this as useful as I have.
The algorithm is simple:
  1. Fill two byte arrays of equal size (half of the memory size
     specified) with equal pseudo-random data.
  2. Walk through each element of both arrays and do a simple
     operation with another random byte on each element.
  3. Compare each array to make sure both are equal (if not,
     bomb out with a failure message).

