summaryrefslogtreecommitdiff
path: root/src/xmalloc.h
blob: 747509cfcbf97646c2915a0318b3ed6b43c1c9e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#ifndef XMALLOC_H
#define XMALLOC_H

#include <stdlib.h>

__attribute__((malloc))
void *xmalloc(size_t size);

__attribute__((malloc))
void *xcalloc(size_t nmemb, size_t size);

void *xrealloc(void *ptr, size_t size);

__attribute__((malloc))
char *xstrdup(const char *s);

#endif /* XMALLOC_H */