Branch: Tag:

1999-10-18

1999-10-18 19:15:44 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

better dmalloc tracking of destructed objects (I hope)

Rev: src/dmalloc.h:1.16
Rev: src/object.c:1.84
Rev: src/pike_memory.c:1.44
Rev: src/program.c:1.159

1:   /* -  * $Id: dmalloc.h,v 1.15 1999/08/16 23:54:54 grubba Exp $ +  * $Id: dmalloc.h,v 1.16 1999/10/18 19:15:40 hubbe Exp $    */      extern char *debug_xalloc(long);
28: Inside #if defined(DEBUG_MALLOC)
  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); +    #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__)
68:   #define dmalloc_register(X,Y,Z,W)   #define dmalloc_unregister(X,Y)   #define debug_free(X,Y,Z,Q) free((X)) + #define debug_malloc_name(P,FN,LINE) + #define debug_malloc_copy_names(p,p2)   #endif