cleaned up stuff, added dht lib
[netyack.git] / src / xmalloc.h
blobd9c85a0630c3a2d105efb3bccf08ba5d418cd1e2
1 /*
2 * netyack
3 * By Daniel Borkmann <daniel@netyack.org>
4 * Copyright 2009, 2010 Daniel Borkmann.
5 * Subject to the GPL.
6 */
8 #ifndef XMALLOC_H
9 #define XMALLOC_H
11 #include "compiler.h"
13 extern __hidden void *xmalloc(size_t size);
14 extern __hidden void *xalloca(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 *xcalloc(size_t nmemb, size_t size);
21 extern __hidden void *xrealloc(void *ptr, size_t nmemb, size_t size);
22 extern __hidden void xfree(void *ptr);
23 extern __hidden char *xstrdup(const char *str);
24 extern __hidden char *xstrndup(const char *str, size_t size);
25 extern __hidden int xdup(int fd);
26 extern __hidden void muntrace_handler(int signal);
27 extern __hidden int xmem_used(void);
28 extern __hidden int xmem_free(void);
29 extern __hidden int xmem_totalarena(void);
31 #endif /* XMALLOC_H */