48 #if MACRO_DOCUMENTATION 57 #define avr_new(type, count) \ 58 ((type *) avr_malloc ((unsigned) sizeof (type) * (count))) 67 #define avr_new0(type, count) \ 68 ((type *) avr_malloc0 ((unsigned) sizeof (type) * (count))) 78 #define avr_renew(type, mem, count) \ 79 ((type *) avr_realloc (mem, (unsigned) sizeof (type) * (count))) 120 ptr = calloc( 1, size );
144 ptr = realloc( ptr, size );
void * avr_malloc(size_t size)
Memory Management Functions.
void avr_free(void *ptr)
Free malloc'd memory.
void * avr_malloc0(size_t size)
Allocate memory and initialize to zero.
void * avr_realloc(void *ptr, size_t size)
Wrapper for realloc().
char * avr_strdup(const char *s)
Wrapper for strdup().