From: ludovic.courtes@laas.fr (Ludovic Courtès)
Subject: [PATCH] Accurate count of freed cells
Date: Tue, 20 Dec 2005 14:16:43 +0100 [thread overview]
Message-ID: <87y82fsybo.fsf@laas.fr> (raw)
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 <ludovic.courtes@laas.fr>
* 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
next reply other threads:[~2005-12-20 13:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-20 13:16 Ludovic Courtès [this message]
2005-12-23 11:14 ` [PATCH] Accurate count of freed cells Han-Wen Nienhuys
2006-01-03 10:10 ` Ludovic Courtès
2006-01-18 8:39 ` Ludovic Courtès
2006-01-18 10:37 ` Han-Wen Nienhuys
2006-01-19 8:27 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y82fsybo.fsf@laas.fr \
--to=ludovic.courtes@laas.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).