1 #ifndef MK_H 2 #define MK_H 1 3 4 # define MK(sz) \ 5 malloc_check_malloc(sz, __FILE__, __LINE__) 6 # define M0(num, sz) \ 7 malloc_check_calloc(num, sz, __FILE__, __LINE__) 8 # define MV(ptr, tmp, sz) \ 9 (((tmp) = malloc_check_realloc(ptr, sz, __FILE__, __LINE__)) && \ 10 ((ptr) = (tmp))) 11 # define F(ptr) \ 12 malloc_check_free(ptr) 13 14 #ifdef __GNUC__ 15 #define MALLOC_CHECK__ATTR_USED() __attribute__((used)) 16 #endif 17 18 #include "../include/malloc-check.h" 19 20 #endif 21