Clear the heap?

Ok thanks very much.
I'm hoping to avoid another while loop but I'll look into it. I'm also considering hooking up a micro to Serial 1 that sends a single char and the mega replies with a single char. The micro would then ground out the reset pin if no response as a brute force reset. Ill let you know how that works if it comes to that.