It could be RAM, that's true. Avast could not cause the errors Memtest revealed.

Follow part 3: RAM - Test with Memtest86+

See if it is a bad motherboard, DIMM, or compatibility problem.