4 #include <stdlib.h> /* for size_t */
7 * avoid possible collision with readline xmalloc functions
10 #define xmalloc _xmalloc_xmalloc
11 #define xrealloc _xmalloc_xrealloc
13 void xmalloc_set_error_handler(void (*)(int));
14 void * xmalloc(size_t);
15 void * xmalloc0(size_t);
16 void * xmalloc_inc(size_t, size_t);
17 void * xmalloc0_inc(size_t, size_t);
18 void * xrealloc(void *, size_t);
19 void * xrealloc_inc(void *, size_t, size_t);
20 char * xstrdup(const char *s);
21 char * xstrndup(const char *s, size_t);
23 #define xfree(ptr) do { free(ptr); ptr = NULL; } while(0)