X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=lib%2Fmem.h;fp=lib%2Fmem.h;h=8ea816053781947aa5a9ad255389027ab5628468;hb=203e950e3d3c76795fa49895d040f732adad2049;hp=0000000000000000000000000000000000000000;hpb=a11eb994c38b1ef41ea05b56736f70cc396e0ff8;p=apps%2Fmadmutt.git diff --git a/lib/mem.h b/lib/mem.h new file mode 100644 index 0000000..8ea8160 --- /dev/null +++ b/lib/mem.h @@ -0,0 +1,20 @@ +/* + * This file is part of mutt-ng, see http://www.muttng.org/. + * It's licensed under the GNU General Public License, + * please see the file GPL in the top level source directory. + */ + +#ifndef _LIB_MEM_H +#define _LIB_MEM_H + +void* _safe_malloc (size_t, int, const char*); +void* _safe_calloc (size_t, size_t, int, const char*); +void _safe_realloc (void*, size_t, int, const char*); +void _safe_free (void*); + +#define safe_malloc(s) _safe_malloc(s,__LINE__,__FILE__) +#define safe_calloc(s,c) _safe_calloc(s,c,__LINE__,__FILE__) +#define safe_realloc(p,c) _safe_realloc(p,c,__LINE__,__FILE__) +#define FREE(x) _safe_free(x) + +#endif /* !_LIB_MEM_H */