Renamed files, updated header comments
[transsip-mirror.git] / src / xmalloc.h
blob981f2c8692c358081f3f8bbdb371cd9b1c745c8b
1 /*
2 * transsip - the telephony network
3 * By Daniel Borkmann <daniel@transsip.org>
4 * Copyright 2011 Daniel Borkmann <dborkma@tik.ee.ethz.ch>,
5 * Swiss federal institute of technology (ETH Zurich)
6 * Subject to the GPL, version 2.
7 */
9 #ifndef XMALLOC_H
10 #define XMALLOC_H
12 #include "compiler.h"
14 extern __hidden void *xmalloc(size_t size);
15 extern __hidden void *xvalloc(size_t size);
16 extern __hidden void *xzmalloc(size_t size);
17 extern __hidden void *xmallocz(size_t size);
18 extern __hidden void *xmalloc_aligned(size_t size, size_t alignment);
19 extern __hidden void *xmemdupz(const void *data, size_t len);
20 extern __hidden void *xrealloc(void *ptr, size_t nmemb, size_t size);
21 extern __hidden void xfree(void *ptr);
22 extern __hidden char *xstrdup(const char *str);
23 extern __hidden char *xstrndup(const char *str, size_t size);
24 extern __hidden int xdup(int fd);
26 #endif /* XMALLOC_H */