die() on memory allocation errors