26 #ifndef SIM_AVRMALLOC_H 27 #define SIM_AVRMALLOC_H 40 #define avr_new(type, count) \ 41 ((type *) avr_malloc ((unsigned) sizeof (type) * (count))) 43 #define avr_new0(type, count) \ 44 ((type *) avr_malloc0 ((unsigned) sizeof (type) * (count))) 46 #define avr_renew(type, mem, count) \ 47 ((type *) avr_realloc (mem, (unsigned) sizeof (type) * (count))) void * avr_malloc(size_t size)
Memory Management Functions.
char * avr_strdup(const char *s)
Wrapper for strdup().
void * avr_malloc0(size_t size)
Allocate memory and initialize to zero.
void * avr_realloc(void *ptr, size_t size)
Wrapper for realloc().
void avr_free(void *ptr)
Free malloc'd memory.