/proc/$PID/maps is a marvellous debugging aid. It helps answer questions like 'is this pointer in range for the heap?'
miniblog.
Related Posts
Thread discussing a remarkable way of being memory safety if you have FS access (you can write to /proc/PID/mem!)
I'm developing a dislike for PID files. There are too many failure cases. Supervisord, runit and others have more robust solutions.