What brand machine is it?
If memtest is indicating a problem, then it's bad ram. Start with taking out 1 stick of ram and see if it works without any issues. Keep on until the problem goes away. Don't complicate it.
NASM-Certified Personal Trainer
“The single biggest problem in communication is the illusion that it has taken place”. George Bernard Shaw