void *mav_malloc(int amount);
void *mav_calloc(int nelem, int elemsize);
void mav_free(void *d);
mav_malloc attempts to malloc amount bytes of memory, and if successful returns a pointer to the base of the allocated memory. If unsuccessful, it calls exit(1).
mav_calloc performs the same function as the system calloc but provides the error-checking described above.
mav_free calls free with argument d.