pike.git / src / dmalloc.h

version» Context lines:

pike.git/src/dmalloc.h:1:   /* -  * $Id: dmalloc.h,v 1.17 1999/10/21 22:40:23 grubba Exp $ +  * $Id: dmalloc.h,v 1.18 1999/10/30 06:31:02 mast Exp $    */      extern char *debug_xalloc(long);   #ifdef DEBUG_MALLOC   struct memhdr;      void dump_memhdr_locations(struct memhdr *from,    struct memhdr *notfrom);   struct memhdr *alloc_memhdr(void);   void really_free_memhdr(struct memhdr *mh);
pike.git/src/dmalloc.h:26: Inside #if defined(DEBUG_MALLOC)
  extern int debug_malloc_touch_fd(int, const char *, int);   extern int debug_malloc_register_fd(int, const char *, int);   extern int debug_malloc_close_fd(int, const char *, int);      void *debug_malloc_update_location(void *,const char *, int);      /* Beware! names of named memory regions are never ever freed!! /Hubbe */   void *debug_malloc_name(void *p,const char *fn, int line);   void debug_malloc_copy_names(void *p, void *p2);    + /* glibc 2.1 defines this as a macro. */ + #ifdef strdup + #undef strdup + #endif +    #define malloc(x) debug_malloc((x), __FILE__, __LINE__)   #define calloc(x, y) debug_calloc((x), (y), __FILE__, __LINE__)   #define realloc(x, y) debug_realloc((x), (y), __FILE__, __LINE__)   #define free(x) debug_free((x), __FILE__, __LINE__,0)   #define dmfree(x) debug_free((x),__FILE__,__LINE__,1)   #define strdup(x) debug_strdup((x), __FILE__, __LINE__)   #define DO_IF_DMALLOC(X) X   #define debug_malloc_touch(X) debug_malloc_update_location((X),__FILE__,__LINE__)   #define debug_malloc_pass(X) debug_malloc_update_location((X),__FILE__,__LINE__)   #define xalloc(X) ((char *)debug_malloc_touch(debug_xalloc(X)))