Rename memory allocation functions.
Handle malloc() failure in allocation routines.