14 /* The Memory Allocation Debugging system */
16 /* GNU headers define this as macros */
25 #define malloc(x) mad_alloc (x, __FILE__, __LINE__)
26 #define calloc(x, y) mad_alloc (x * y, __FILE__, __LINE__)
27 #define realloc(x, y) mad_realloc (x, y, __FILE__, __LINE__)
28 #define xmalloc(x, y) mad_alloc (x, __FILE__, __LINE__)
29 #define strdup(x) mad_strdup (x, __FILE__, __LINE__)
30 #define free(x) mad_free (x, __FILE__, __LINE__)
32 void mad_check (char *file
, int line
);
33 void *mad_alloc (int size
, char *file
, int line
);
34 void *mad_realloc (void *ptr
, int newsize
, char *file
, int line
);
35 char *mad_strdup (const char *s
, char *file
, int line
);
36 void mad_free (void *ptr
, char *file
, int line
);
37 void mad_finalize (char *file
, int line
);
40 #define mad_finalize(x, y)
41 #define mad_check(file,line)