Commit 3

Checks to see if memory is available. If unavailable it kills the
application.