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.320 2008/06/30 07:42:32 grubba Exp $ + || $Id: gc.c,v 1.321 2008/07/24 17:51:23 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:3414:    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    gc_touch_all_strings();   #endif -  if (n != (unsigned) num_objects) +  if (n != (unsigned) num_objects && !got_unlinked_things)    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;      #ifdef PIKE_DEBUG    mark_externals();
pike.git/src/gc.c:3569:   #endif    Pike_in_gc=GC_PASS_POSTTOUCH;    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    gc_touch_all_strings();   #endif -  if (n != (unsigned) num_objects) +  if (n != (unsigned) num_objects && !got_unlinked_things)    Pike_fatal("Object count wrong in gc; expected %d, got %d.\n", num_objects, n);   #if 0 /* Temporarily disabled - Hubbe */   #ifdef PIKE_DEBUG   #ifdef DEBUG_MALLOC    PTR_HASH_LOOP(marker, i, m)    if (!(m->flags & (GC_POSTTOUCHED|GC_WEAK_FREED)) &&    dmalloc_is_invalid_memory_block(m->data)) {    fprintf(stderr, "Found a stray marker after posttouch pass: ");    describe_marker(m);    fprintf(stderr, "Describing marker location(s):\n");