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.343 2010/04/15 23:32:03 mast Exp $ + || $Id: gc.c,v 1.344 2010/04/16 00:15:17 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:4261:   {    /* Since the array to search is so small, linear search is probably    * fastest. */    unsigned t;    for (t = 0; t < NELEM (visit_fn_from_type); t++)    if (visit_fn_from_type[t] == fn)    return (TYPE_T) t;    return PIKE_T_UNKNOWN;   }    + PMOD_EXPORT void real_visit_svalues (const struct svalue *s, size_t num, +  int ref_type) + { +  for (; num; num--, s++) +  visit_svalue (s, ref_type); + } +    /* Memory counting    *    * This mode is used by f_count_memory, and it's recognized by a    * nonzero value in mc_pass.    *    * The basic idea is to follow and count all refs from the starting    * point things given to f_count_memory. Whenever the counted refs add    * up to the refcount for a thing, that thing is known to have only    * internal refs, and so it's memory counted and then all its refs are    * followed too.