diff options
Diffstat (limited to 'polyp/xmalloc.h')
-rw-r--r-- | polyp/xmalloc.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/polyp/xmalloc.h b/polyp/xmalloc.h new file mode 100644 index 00000000..5f58a8ad --- /dev/null +++ b/polyp/xmalloc.h @@ -0,0 +1,14 @@ +#ifndef foomemoryhfoo +#define foomemoryhfoo + +#include <sys/types.h> + +void* pa_xmalloc(size_t l); +void *pa_xmalloc0(size_t l); +void *pa_xrealloc(void *ptr, size_t size); +#define pa_xfree free + +char *pa_xstrdup(const char *s); +char *pa_xstrndup(const char *s, size_t l); + +#endif |