0 /* See LICENSE file for copyright and license details. */
1 #ifdef MEM_CHECK
2 #ifndef _MEMCHECK_H_
3 #define _MEMCHECK_H_
4
5 void __free(void*, const char*, int, const char*);
6 void* __malloc(size_t, const char*, int, const char*);
7 void* __calloc(size_t, size_t, const char*, int, const char*);
8 void* __realloc(void*, size_t, const char*, int, const char*);
9 void __init();
10 void __check();
11
12 #define free(x) __free(x, __FILE__, __LINE__, __func__)
13 #define malloc(x) __malloc(x, __FILE__, __LINE__, __func__)
14 #define calloc(x,y) __calloc(x, y, __FILE__, __LINE__, __func__)
15 #define realloc(x,y) __realloc(x, y, __FILE__, __LINE__, __func__)
16 #define main(x,y) __main(x, y)
17 #endif
18 #endif
19