summaryrefslogtreecommitdiffstats
path: root/malloc.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2007-04-25 10:27:13 +0000
committerLennart Poettering <lennart@poettering.net>2007-04-25 10:27:13 +0000
commit2eb6dec8e9f0114bdbad59cf8f11f197f8fdaaf3 (patch)
tree88a2b13b2fc9abdd9fa43136d4ed91bdc084d929 /malloc.h
parent130f9f7046eec89f7674cad7f66c831fa8d0127d (diff)
initial commit
git-svn-id: file:///home/lennart/svn/public/libsydney/trunk@3 9ba3c220-e4d3-45a2-8aa3-73fcc9aff6ce
Diffstat (limited to 'malloc.h')
-rw-r--r--malloc.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/malloc.h b/malloc.h
new file mode 100644
index 0000000..df459ed
--- /dev/null
+++ b/malloc.h
@@ -0,0 +1,16 @@
+#ifndef foomallochfoo
+#define foomallochfoo
+
+#include <stdlib.h>
+#include <string.h>
+
+#define sa_malloc malloc
+#define sa_free free
+#define sa_malloc0(size) calloc(1, (size))
+#define sa_strdup strdup
+
+void* sa_memdup(const void* p, size_t size);
+
+#define sa_new(t, n) ((t*) sa_malloc(sizeof(t)*n))
+
+#endif