ArcSoft interview question

How to detect the allocated memory is overwritten?