Errno:ENOMEM means you may not be able to execute any code - there is no memory so no new objects or anything can be allocated. The very first thing that happens may be that it throws ENOMEM again