These are relatively simple programs.

test_memory works by filling a certain amount of memory with random data using the random() function. The RNG is seeded with a known value. It then begins an infinte loop and recalculates the random values for the same areas of memory (by re-seeding the RNG). If the two values differ, it may indicate that when the program reads from memory, it gets a different value than was originally written. Ideally you should tell the program to test your physical memory size. However, this probably causes swapping and may take a really long time to complete. For better performance, use slightly less than your physical memory size.

test_cpu works by repeatedly calculating an MD5 checksum of 1MB of random data. If a subsequent checksum is different than the original checksum, you may have have a CPU that fails to properly perfom simple math calculations.