pike.git / src / gc.c

version» Context lines:

pike.git/src/gc.c:22:   #include "time_stuff.h"   #include "constants.h"   #include "interpret.h"      #include "gc.h"   #include "main.h"   #include <math.h>      #include "block_alloc.h"    - RCSID("$Id: gc.c,v 1.81 2000/04/26 12:13:56 mast Exp $"); + RCSID("$Id: gc.c,v 1.82 2000/04/27 02:13:28 hubbe Exp $");      /* Run garbage collect approximate every time we have    * 20 percent of all arrays, objects and programs is    * garbage.    */      #define GC_CONST 20   #define MIN_ALLOC_THRESHOLD 1000   #define MAX_ALLOC_THRESHOLD 10000000   #define MULTIPLIER 0.9
pike.git/src/gc.c:211:    fprintf(stderr,"%*s **In p->next\n",indent,"");       if(p->inherits &&    ptr >= (char *)p->inherits &&    ptr<(char*)(p->inherits+p->num_inherits))    {    e=((long)ptr - (long)(p->inherits)) / sizeof(struct inherit);    fprintf(stderr,"%*s **In p->inherits[%ld] (%s)\n",indent,"",    e,    p->inherits[e].name ? p->inherits[e].name->str : "no name"); -  return; +  break;    }       if(p->constants &&    ptr >= (char *)p->constants &&    ptr<(char*)(p->constants+p->num_constants))    {    e=((long)ptr - (long)(p->constants)) / sizeof(struct program_constant);    fprintf(stderr,"%*s **In p->constants[%ld] (%s)\n",indent,"",    e,    p->constants[e].name ? p->constants[e].name->str : "no name"); -  return; +  break;    }          if(p->identifiers &&    ptr >= (char *)p->identifiers &&    ptr<(char*)(p->identifiers+p->num_identifiers))    {    e=((long)ptr - (long)(p->identifiers)) / sizeof(struct identifier);    fprintf(stderr,"%*s **In p->identifiers[%ld] (%s)\n",indent,"",    e,    p->identifiers[e].name ? p->identifiers[e].name->str : "no name"); -  return; +  break;    }      #define FOO(NTYP,TYP,NAME) \    if(location == (void *)&p->NAME) fprintf(stderr,"%*s **In p->" #NAME "\n",indent,""); \    if(ptr >= (char *)p->NAME && ptr<(char*)(p->NAME+p->PIKE_CONCAT(num_,NAME))) \    fprintf(stderr,"%*s **In p->" #NAME "[%ld]\n",indent,"",((long)ptr - (long)(p->NAME)) / sizeof(TYP));   #include "program_areas.h"    -  return; +  break;    }       case T_OBJECT:    {    struct object *o=(struct object *)memblock;    struct program *p;       if(location == (void *)&o->parent) fprintf(stderr,"%*s **In o->parent\n",indent,"");    if(location == (void *)&o->prog) fprintf(stderr,"%*s **In o->prog\n",indent,"");    if(location == (void *)&o->next) fprintf(stderr,"%*s **In o->next\n",indent,"");
pike.git/src/gc.c:295:    ( tmp.prog->storage_needed - tmp.prog->inherits[0].storage_offset ))    {    fprintf(stderr,"%*s **In storage for inherit %d",indent,"",e);    if(tmp.name)    fprintf(stderr," (%s)",tmp.name->str);    fprintf(stderr,"\n");    }       }    } -  return; +  break;    }       case T_ARRAY:    {    struct array *a=(struct array *)memblock;    struct svalue *s=(struct svalue *)location;    fprintf(stderr,"%*s **In index %ld\n",indent,"",(long)(s-ITEM(a))); -  return; +  break;    }    } -  +  +  dmalloc_describe_location(memblock, location, indent);   }      static void gdb_gc_stop_here(void *a)   {    fprintf(stderr,"***One ref found%s.\n",found_where?found_where:"");    describe_something(found_in, found_in_type, 2, 1, DESCRIBE_NO_DMALLOC);    describe_location(found_in , found_in_type, gc_svalue_location,2,1,0);    fprintf(stderr,"----------end------------\n");   }