Branch: Tag:

2000-03-07

2000-03-07 21:23:42 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

dmalloc updated and optimized

Rev: src/array.c:1.62
Rev: src/dmalloc.h:1.19
Rev: src/gc.c:1.49
Rev: src/main.c:1.81
Rev: src/pike_memory.c:1.53

29:      #include "block_alloc.h"    - RCSID("$Id: gc.c,v 1.48 2000/02/22 21:28:52 hubbe Exp $"); + RCSID("$Id: gc.c,v 1.49 2000/03/07 21:23:41 hubbe Exp $");      /* Run garbage collect approximate every time we have    * 20 percent of all arrays, objects and programs is
236: Inside #if defined(PIKE_DEBUG)
   return ret;   }    - void describe_something(void *a, int t, int dm) + void low_describe_something(void *a, int t, int dm)   {    struct program *p=(struct program *)a; -  if(!a) return; +     - #ifdef DEBUG_MALLOC -  if(dm) -  debug_malloc_dump_references(a); - #endif -  -  if(t==-1) -  { -  fprintf(stderr,"**Location description: %s\n",(char *)a); -  return; -  } -  -  fprintf(stderr,"**Location: %p Type: %s Refs: %d\n",a, -  get_name_of_type(t), -  *(INT32 *)a); -  +     switch(t)    {    case T_FUNCTION:
358:    break;    }    } + } +  + void describe_something(void *a, int t, int dm) + { +  struct program *p=(struct program *)a; +  if(!a) return; +  +  if(t==-1) +  { +  fprintf(stderr,"**Location description: %s\n",(char *)a); +  return; +  } +  +  fprintf(stderr,"**Location: %p Type: %s Refs: %d\n",a, +  get_name_of_type(t), +  *(INT32 *)a); +  +  low_describe_something(a,t,dm); +  + #ifdef DEBUG_MALLOC +  if(dm) +  debug_malloc_dump_references(a); + #endif +  +     fprintf(stderr,"*******************\n");   }