summaryrefslogtreecommitdiff
path: root/src/xmalloc.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/xmalloc.h')
-rw-r--r--src/xmalloc.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/xmalloc.h b/src/xmalloc.h
new file mode 100644
index 0000000..a661004
--- /dev/null
+++ b/src/xmalloc.h
@@ -0,0 +1,14 @@
+#ifndef XMALLOC_H
+#define XMALLOC_H
+
+#include <stdlib.h>
+
+__attribute__((malloc))
+void *xmalloc(size_t size);
+
+__attribute__((malloc))
+void *xcalloc(size_t nmemb, size_t size);
+
+void *xrealloc(void *ptr, size_t size);
+
+#endif /* XMALLOC_H */