How to Diagnose Your Mac for Bad RAM
Posted 04/21/2011 at 11:00am
| by Florence Ion
If you're having some serious performance issues with your Mac -- say, applications seem to crash randomly when you start them up, your Mac is incessantly freezing, or some software just hangs without really loading -- you'll want to check to see that the RAM is really the issue and you're not simply in need of a software update. Use Memtest to run a Unix command that checks on your bad RAM.

Memtest runs a Unix command to check your RAM.
You can run Memtest, an advanced command-line memory diagnostic Unix utility to analyze your RAM. The blog Command-Tab put together a Memtest unloader (bit.ly/memunloader) that places the utility right into your /user/bin folder.
After you install it, you’ll need to reboot your Mac into Single User Mode by holding down Command + S during the boot screen. After the system logging is done scrolling, type:
memtest all 2
to test your memory twice. Memtest will run two passes to see if there’s anything wrong with the RAM (it’ll take just a couple minutes).
Alternately, you could run the test for a couple of hours with the command:
memtest all
if you suspect that the issue is an intermittent memory problem (by not setting a number after all, you’re telling Memtest to loop indefinitely). If your system locks up or freezes during that test, there’s probably some bad memory in your Mac and it’s time to replace it.
When you're all finished and memtest prompts you to do so, type in "exit" to boot normally into OS X.