pike.git / src / gc.c

version» Context lines:

pike.git/src/gc.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: gc.c,v 1.215 2003/03/30 20:46:41 mast Exp $ + || $Id: gc.c,v 1.216 2003/04/02 19:22:43 mast Exp $   */      #include "global.h"      struct callback *gc_evaluator_callback=0;      #include "array.h"   #include "multiset.h"   #include "mapping.h"   #include "object.h"
pike.git/src/gc.c:26:   #include "interpret.h"   #include "bignum.h"   #include "pike_threadlib.h"      #include "gc.h"   #include "main.h"   #include <math.h>      #include "block_alloc.h"    - RCSID("$Id: gc.c,v 1.215 2003/03/30 20:46:41 mast Exp $"); + RCSID("$Id: gc.c,v 1.216 2003/04/02 19:22:43 mast Exp $");      int gc_enabled = 1;      /* These defaults are only guesses and hardly tested at all. Please improve. */   double gc_garbage_ratio_low = 0.2;   double gc_time_ratio = 0.05;   double gc_garbage_ratio_high = 0.5;      /* This slowness factor approximately corresponds to the average over    * the last ten gc rounds. (0.9 == 1 - 1/10) */
pike.git/src/gc.c:439:    e = ((char *)ptr - (char *)(p->identifiers)) /    sizeof(struct identifier);       fprintf(stderr,"%*s **In p->identifiers[%"PRINTPTRDIFFT"d] (%s)\n",indent,"",    e, p->identifiers[e].name ?    (strlen(p->identifiers[e].name->str)<100 ? p->identifiers[e].name->str : "Name too long or already freed.." )    : "no name");    break;    }    - #define FOO(NTYP,TYP,NAME) \ + #define FOO(NUMTYPE,TYPE,ARGTYPE,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 "[%"PRINTPTRDIFFT"d]\n",indent,"", \ -  ((char *)ptr - (char *)(p->NAME)) / sizeof(TYP)); +  ((char *)ptr - (char *)(p->NAME)) / sizeof(TYPE));   #include "program_areas.h"       break;    }       case T_OBJECT:    {    struct object *o=(struct object *)memblock;    struct program *p;   
pike.git/src/gc.c:909: Inside #if defined(PIKE_DEBUG)
   int e;    fprintf(stderr,"%*s**identifiers:\n",indent,"");    for(e=0;e<p->num_identifier_references;e++)    fprintf(stderr,"%*s**** %s\n",indent,"",ID_FROM_INT(p,e)->name->str);       fprintf(stderr,"%*s**num inherits: %d\n",indent,"",p->num_inherits);    }       if(flags & DESCRIBE_MEM)    { - #define FOO(NUMTYPE,TYPE,NAME) \ + #define FOO(NUMTYPE,TYPE,ARGTYPE,NAME) \    fprintf(stderr, "%*s* " #NAME " %p[%"PRINTSIZET"u]\n", \    indent, "", p->NAME, p->PIKE_CONCAT(num_,NAME));   #include "program_areas.h"    }       break;    }      #ifdef PIKE_NEW_MULTISETS    case T_MULTISET_DATA: {