If the memory has bad modules you fix it buy getting new memory.

Did you run Memtest86 or Microsoft Memory Diagnostic