Rocco Rutte:
[apps/madmutt.git] / lib / mem.h
1 /*
2  * This file is part of mutt-ng, see http://www.muttng.org/.
3  * It's licensed under the GNU General Public License,
4  * please see the file GPL in the top level source directory.
5  */
6
7 #ifndef _LIB_MEM_H
8 #define _LIB_MEM_H
9
10 void* _safe_malloc (size_t, int, const char*);
11 void* _safe_calloc (size_t, size_t, int, const char*);
12 void _safe_realloc (void*, size_t, int, const char*);
13 void _safe_free (void*);
14
15 #define safe_malloc(s) _safe_malloc(s,__LINE__,__FILE__)
16 #define safe_calloc(s,c) _safe_calloc(s,c,__LINE__,__FILE__)
17 #define safe_realloc(p,c) _safe_realloc(p,c,__LINE__,__FILE__)
18 #define FREE(x) _safe_free(x)
19
20 #endif /* !_LIB_MEM_H */