title: Can I catch out of memory errors?
body: <p>I want to write a safe program, so I will allocate required space in heap at the start of program.</p>
  
  <ol>
  <li>Is it possible starting from some point disable heap memory allocation,
  like <code>toggle_panic_on_heap_allocation</code>?</li>
  <li>How can I catch "out of memory" error during initialization? Default behavior is abort, but I would like not crash, just exit with error code?</li>
  </ol>