How to memory test in Linux?

I'm planning to test my Linux box and I want to start in memory testing. But my problem is what should I need to test the memory in my linux box? Should I need a tool? Or there are some APIs to use to build some scripts?

Thanks


Many live linux cds have an option to do a memory test at the boot menu, usually marked as memtest+86 or something similar. For instance, I'm pretty sure ubuntu 9.10 has it.