Hi,

The patch below fixes the way freed cells are counted in
`scm_i_sweep_card ()'.  Basically, without this patch, FREE_COUNT is
incremented regardless of whether the cell pointed to by SCMPTR was
already free or not.

Thanks,
Ludovic.


2005-12-20  Ludovic Courtès  <[EMAIL PROTECTED]>

        * gc-card.c (scm_i_sweep_card): Only increment FREE_COUNT for
        cells that were really freed.


--- orig/libguile/gc-card.c
+++ mod/libguile/gc-card.c
@@ -255,10 +255,13 @@
          abort();
        }
 
+      if (SCM_CELL_TYPE (scmptr) != scm_tc_free_cell)
+       /* Only account for cells that were really freed.  */
+       free_count ++;
+
       SCM_GC_SET_CELL_WORD (scmptr, 0, scm_tc_free_cell);        
       SCM_SET_FREE_CELL_CDR (scmptr, PTR2SCM (*free_list));
       *free_list = scmptr;
-      free_count ++;
     }
 
   return free_count;


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel

Reply via email to