[ Maverik Level 1 functions ]


mav_malloc

mav_malloc, mav_free

Summary

Maverik dynamic memory management.


Syntax

void *mav_malloc(int amount);

void mav_free(void *d);


Description

For convenience, Maverik provides wrapper functions to the standard system malloc 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_free calls free with argument d.


Back to the index page.