From 2eb6dec8e9f0114bdbad59cf8f11f197f8fdaaf3 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 25 Apr 2007 10:27:13 +0000 Subject: initial commit git-svn-id: file:///home/lennart/svn/public/libsydney/trunk@3 9ba3c220-e4d3-45a2-8aa3-73fcc9aff6ce --- malloc.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 malloc.h (limited to 'malloc.h') 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 +#include + +#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 -- cgit