mav_malloc(3)

NAME
mav_malloc - Maverik dynamic memory management.

LEVEL
Maverik Level 1

SYNTAX
void *mav_malloc(int amount);

void *mav_calloc(int nelem, int elemsize);

void mav_free(void *d);

DESCRIPTION
For convenience, Maverik provides wrapper functions to the standard system malloc, calloc and free functions. The wrappers check for out-of-memory errors.

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.