Branch: Tag:

2003-01-11

2003-01-11 03:06:54 by Martin Stjernholm <mast@lysator.liu.se>

Fixed bug in the new calculation of the amount of garbage.

Rev: src/array.c:1.135
Rev: src/gc.c:1.194
Rev: src/mapping.c:1.161
Rev: src/multiset.c:1.67
Rev: src/object.c:1.217
Rev: src/program.c:1.473

2:   || 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: array.c,v 1.134 2003/01/11 00:01:20 mast Exp $ + || $Id: array.c,v 1.135 2003/01/11 03:06:54 mast Exp $   */      #include "global.h"
25:   #include "bignum.h"   #include "cyclic.h"    - RCSID("$Id: array.c,v 1.134 2003/01/11 00:01:20 mast Exp $"); + RCSID("$Id: array.c,v 1.135 2003/01/11 03:06:54 mast Exp $");      PMOD_EXPORT struct array empty_array=   {
2247:   size_t gc_free_all_unreferenced_arrays(void)   {    struct array *a,*next; -  size_t freed = 0; +  size_t unreferenced = 0;       for (a = gc_internal_array; a != &weak_empty_array; a = next)    {
2263:       gc_free_extra_ref(a);    SET_NEXT_AND_FREE(a, free_array); -  freed++; +     }    else    {    next=a->next;    } -  +  unreferenced++;    }    -  return freed; +  return unreferenced;   }