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.233 2003/09/23 22:27:50 mast Exp $ + || $Id: gc.c,v 1.234 2003/09/24 00:57:58 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.233 2003/09/23 22:27:50 mast Exp $"); + RCSID("$Id: gc.c,v 1.234 2003/09/24 00:57:58 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:593:    break;    }    else if (&k->val == (struct svalue *) location) {    fprintf(stderr, "%*s **In value with index ", indent, "");    print_svalue(stderr, &k->ind);    fputc('\n', stderr);    break;    }    break;    } +  +  case T_PIKE_FRAME: { +  struct pike_frame *f = (struct pike_frame *) descblock; +  if (f->locals) { /* Paranoia. */ +  ptrdiff_t pos = (struct svalue *) location - f->locals; +  if (pos >= 0) { +  if (pos < f->num_args) +  fprintf (stderr, "%*s **In argument %"PRINTPTRDIFFT"d\n", +  indent, "", pos); +  else +  fprintf (stderr, "%*s **At position %"PRINTPTRDIFFT"d among locals\n", +  indent, "", pos - f->num_args);    } -  +  } +  break; +  } +  }       if(memblock && depth>0)    describe_something(memblock,type,indent+2,depth-1,flags | DESCRIBE_MEM,inblock);      #ifdef DEBUG_MALLOC    /* FIXME: Is the following call correct?    * Shouldn't the second argument be an offset?    */    /* dmalloc_describe_location(descblock, location, indent); */    /* My attempt to fix it, although I'm not really sure: /mast */