Frage im Vorstellungsgespräch bei Google

How would you write a program to detect memory segmentation faults?