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: mapping.c,v 1.160 2003/01/11 00:01:20 mast Exp $ + || $Id: mapping.c,v 1.161 2003/01/11 03:06:54 mast Exp $   */      #include "global.h" - RCSID("$Id: mapping.c,v 1.160 2003/01/11 00:01:20 mast Exp $"); + RCSID("$Id: mapping.c,v 1.161 2003/01/11 03:06:54 mast Exp $");   #include "main.h"   #include "object.h"   #include "mapping.h"
2396:   {    struct mapping *m,*next;    struct mapping_data *md; -  size_t freed = 0; +  size_t unreferenced = 0;       for(m=gc_internal_mapping;m;m=next)    {
2421:   #endif    gc_free_extra_ref(m);    SET_NEXT_AND_FREE(m, free_mapping); -  freed++; +     }    else    {    next=m->next;    } -  +  unreferenced++;    }    -  return freed; +  return unreferenced;   }      #ifdef PIKE_DEBUG