Detecting some out-of memory conditions and exiting with a log message.