If so you can test your RAM. Go here and click Free Downloads to download an ISO to boot off of to test your RAM. Unzip it then you can burn the ISO to a CD on OS X using Disk Utility, or on Windows if you have burning software installed.
You'll have to Google to find out how to get to the boot menu to boot from the CD if it doesn't automatically do it.
That's the first place I'd start anyway if it does it in random programs.