4223
|
1 #ifndef XMALLOC_H_
|
|
2 #define XMALLOC_H_
|
|
3
|
|
4 #include "config.h"
|
|
5
|
|
6 #include <stddef.h>
|
|
7
|
|
8 void xend(void);
|
|
9 #if DEBUG_P
|
|
10 void *xmalloc(size_t, size_t, const char *, unsigned);
|
|
11 void *xrealloc(void *, size_t, const char *, unsigned);
|
|
12 #define xmalloc(n, m) xmalloc(n, m, __FILE__, __LINE__)
|
|
13 #define xrealloc(p, n) xrealloc(p, n, __FILE__, __LINE__)
|
|
14 #else
|
|
15 void *xmalloc(size_t, size_t);
|
|
16 void *xrealloc(void *, size_t);
|
|
17 #endif
|
|
18 void xfree(void *);
|
|
19
|
|
20 #endif /* XMALLOC_H_ */
|