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.214 2003/03/30 14:21:56 grubba Exp $ + || $Id: gc.c,v 1.215 2003/03/30 20:46:41 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.214 2003/03/30 14:21:56 grubba Exp $"); + RCSID("$Id: gc.c,v 1.215 2003/03/30 20:46:41 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:171:   /* gc_frame objects are used as frames in a recursion stack during the    * cycle check pass. gc_rec_top points to the current top of the    * stack. When a thing is recursed, a pop frame is first pushed on the    * stack and then the gc_cycle_check_* function fills in with link    * frames for every reference the thing contains.    *    * rec_list is a double linked list of the pop frames on the stack,    * and that list represents the current prospective destruct order.    * gc_rec_last points at the last frame in the list and new frames are    * linked in after it. A cycle is always treated as one atomic unit, -  * e.g. it's either popped whole or not at all. That means that +  * i.e. it's either popped whole or not at all. That means that    * rec_list might contain frames that are no longer on the stack.    *    * A range of frames which always ends at the end of the list may be    * rotated a number of slots to break a cyclic reference at a chosen    * point. The stack of link frames are rotated simultaneously.    *    * Frames for live objects are linked into the beginning of kill_list    * when they're popped from rec_list.    *    * The cycle check functions might recurse another round through the
pike.git/src/gc.c:1042:    fprintf(stderr,"%*s**Location description: %s\n",indent,"",(char *)a);    return;    }       /* Disable debug, this may help reduce recursion bugs */    tmp=d_flag;    d_flag=0;      #ifdef DEBUG_MALLOC    if (((int)a) == 0x55555555) { -  fprintf(stderr,"%*s**Location: %p Type: %s Zapped pointer\n",indent,"",a, +  fprintf(stderr,"%*s**Block: %p Type: %s Zapped pointer\n",indent,"",a,    get_name_of_type(t));    } else   #endif /* DEBUG_MALLOC */    if (((ptrdiff_t)a) & 3) { -  fprintf(stderr,"%*s**Location: %p Type: %s Misaligned address\n",indent,"",a, +  fprintf(stderr,"%*s**Block: %p Type: %s Misaligned address\n",indent,"",a,    get_name_of_type(t));    } else { -  fprintf(stderr,"%*s**Location: %p Type: %s Refs: %d\n",indent,"",a, +  fprintf(stderr,"%*s**Block: %p Type: %s Refs: %d\n",indent,"",a,    get_name_of_type(t),    *(INT32 *)a);       low_describe_something(a,t,indent,depth,flags,inblock);      #ifdef DEBUG_MALLOC    if(!(flags & DESCRIBE_NO_DMALLOC))    debug_malloc_dump_references(a,indent+2,depth-1,flags);   #endif    }