2 * netsniff-ng - the packet sniffing beast
3 * By Daniel Borkmann <daniel@netsniff-ng.org>
4 * Copyright 2009, 2010 Daniel Borkmann.
5 * Subject to the GPL, version 2.
16 extern __hidden
void *xmalloc(size_t size
);
17 extern __hidden
void *xzmalloc(size_t size
);
18 extern __hidden
void *xmallocz(size_t size
);
19 extern __hidden
void *xmalloc_aligned(size_t size
, size_t alignment
);
20 extern __hidden
void *xzmalloc_aligned(size_t size
, size_t alignment
);
21 extern __hidden
void *xmemdupz(const void *data
, size_t len
);
22 extern __hidden
void *xrealloc(void *ptr
, size_t nmemb
, size_t size
);
23 extern __hidden
void xfree_func(void *ptr
);
24 extern __hidden
char *xstrdup(const char *str
);
25 extern __hidden
char *xstrndup(const char *str
, size_t size
);
26 extern __hidden
int xdup(int fd
);
30 if (unlikely((ptr) == NULL)) \
31 panic("xfree: NULL pointer given as argument\n"); \
36 #endif /* XMALLOC_H */