#include <stdlib.h>

#define xalloc(count, type) ((type *)safe_malloc((count) * sizeof(type)))
#define xrealloc(p, count, type) \
        ((type *)safe_realloc((void *)(p), (count) * sizeof(type)))
#define xfree(p) safe_free(p)
#define xstrdup(s) safe_strdup(s)

void *safe_malloc(size_t size);
void *safe_realloc(void *p, size_t size);
void safe_free(void *p);
char *xstrdup(char *s);

