pike.git / src / pike_types.c

version» Context lines:

pike.git/src/pike_types.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: pike_types.c,v 1.297 2007/04/25 22:10:05 mast Exp $ + || $Id: pike_types.c,v 1.298 2007/04/26 09:49:37 grubba Exp $   */      #include "global.h"   #include <ctype.h>   #include "svalue.h"   #include "pike_types.h"   #include "stralloc.h"   #include "stuff.h"   #include "array.h"   #include "program.h"
pike.git/src/pike_types.c:2304: Inside #if defined (PIKE_DEBUG) || defined (DO_PIKE_CLEANUP)
  {    unsigned INT32 index;    if (!gc_keep_markers)    Pike_fatal ("Should only be called in final cleanup.\n");    for (index = 0; index < pike_type_hash_size; index++) {    struct pike_type *t;    for (t = pike_type_hash[index]; t; t = t->next) {    struct marker *m = find_marker (t);    INT32 m_refs = m ? m->refs : 0;    INT32 refs = t->refs; -  while (refs > m_refs) { +  if (refs > m_refs) { +  do {    if (m) m->flags |= GC_CLEANUP_FREED;    free_type (t);    refs--; -  +  } while (refs > m_refs); +  /* t is invalid here, as is its next pointer. +  * Start over from the top of this hash entry. +  */ +  index--; +  break;    }    }    }   }      #endif /* PIKE_DEBUG || DO_PIKE_CLEANUP */         /******/