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.279 2007/03/31 21:41:34 grubba Exp $ + || $Id: gc.c,v 1.280 2007/04/25 21:58:33 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:1771: Inside #if defined(PIKE_DEBUG)
      GC_ENTER (NULL, PIKE_T_UNKNOWN) {    mark_externals();    call_callback(& gc_callbacks, NULL);       gc_check_all_arrays();    gc_check_all_multisets();    gc_check_all_mappings();    gc_check_all_programs();    gc_check_all_objects(); + #if defined (PIKE_DEBUG) || defined (DO_PIKE_CLEANUP) +  debug_gc_check_all_types(); + #endif    } GC_LEAVE;      #ifdef DEBUG_MALLOC    {    extern void dmalloc_find_references_to(void *);   #if 0    fprintf(stderr,"**DMALLOC Looking for references:\n");    dmalloc_find_references_to(a);   #endif    }
pike.git/src/gc.c:2932:   #endif    if (gc_debug) {    unsigned n;    Pike_in_gc = GC_PASS_PRETOUCH;    n = gc_touch_all_arrays();    n += gc_touch_all_multisets();    n += gc_touch_all_mappings();    n += gc_touch_all_programs();    n += gc_touch_all_objects();   #ifdef PIKE_DEBUG - #if 0 -  gc_touch_all_types(); - #endif +     gc_touch_all_strings();   #endif    if (n != (unsigned) num_objects)    Pike_fatal("Object count wrong before gc; expected %d, got %d.\n", num_objects, n);    GC_VERBOSE_DO(fprintf(stderr, "| pretouch: %u things\n", n));    }       /* First we count internal references */    Pike_in_gc=GC_PASS_CHECK;    gc_ext_weak_refs = 0;
pike.git/src/gc.c:2957:    mark_externals();   #endif    call_callback(& gc_callbacks, NULL);       ACCEPT_UNFINISHED_TYPE_FIELDS {    gc_check_all_arrays();    gc_check_all_multisets();    gc_check_all_mappings();    gc_check_all_programs();    gc_check_all_objects(); + #if defined (PIKE_DEBUG) || defined (DO_PIKE_CLEANUP) +  debug_gc_check_all_types(); + #endif    } END_ACCEPT_UNFINISHED_TYPE_FIELDS;       GC_VERBOSE_DO(fprintf(stderr, "| check: %u references in %d things, "    "counted %"PRINTSIZET"u weak refs\n",    checked, num_objects, gc_ext_weak_refs));       Pike_in_gc=GC_PASS_MARK;       /* Anything after and including gc_internal_* in the linked lists    * are considered to lack external references. The mark pass move