title: How to detect that my app has crahed because it ran out of memory?
body: <p>Is there a way to find out (write to log) that my app hasn't just crashed, but has run out of memory? Can I install some kind of a global exception handler?
  I have my own custom <code>Application</code> class, if that helps.</p>
  
  <p>Note: the app has a native (C++) core, and I need to be able to detect that the core has run out of memory, as well as the Java wrapper. I don't need to know where it happened, though (don't think it's possible?..), just the fact.</p>