Branch: Tag:

1999-10-22

1999-10-22 02:35:57 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

more and better DMALLOC

Rev: bin/test_pike.pike:1.29
Rev: src/builtin_functions.c:1.192
Rev: src/object.c:1.85
Rev: src/object.h:1.31
Rev: src/pike_memory.c:1.48

5:   \*/   /**/   #include "global.h" - RCSID("$Id: builtin_functions.c,v 1.191 1999/10/21 22:15:05 grubba Exp $"); + RCSID("$Id: builtin_functions.c,v 1.192 1999/10/22 02:35:53 hubbe Exp $");   #include "interpret.h"   #include "svalue.h"   #include "pike_macros.h"
4045: Inside #if defined(DEBUG_MALLOC)
   reset_debug_malloc();   }    + void f__dmalloc_set_name(INT32 args) + { +  char *s; +  INT_TYPE i; +  extern int dynamic_location_number(const char *file, int line); +  extern int dmalloc_default_location; +  +  if(args) +  { +  get_all_args("_dmalloc_set_name", args, "%s%i", &s, &i); +  dmalloc_default_location = dynamic_location_number(s, i); +  }else{ +  dmalloc_default_location=0; +  } +  pop_n_elems(args); + } +    void f__list_open_fds(INT32 args)   {    extern void list_open_fds(void);
5296: Inside #if defined(DEBUG_MALLOC)
     /* function(void:void) */    ADD_EFUN("_reset_dmalloc",f__reset_dmalloc,tFunc(tVoid,tVoid),OPT_SIDE_EFFECT); +  ADD_EFUN("_dmalloc_set_name",f__dmalloc_set_name,tOr(tFunc(tStr tInt,tVoid), tFunc(tVoid,tVoid)),OPT_SIDE_EFFECT);    ADD_EFUN("_list_open_fds",f__list_open_fds,tFunc(tVoid,tVoid),OPT_SIDE_EFFECT);   #endif   #ifdef PIKE_DEBUG