summaryrefslogtreecommitdiff
path: root/libguile/gc.c
diff options
context:
space:
mode:
authorGreg J. Badros <gjb@cs.washington.edu>1999-09-27 23:30:36 +0000
committerGreg J. Badros <gjb@cs.washington.edu>1999-09-27 23:30:36 +0000
commit25748c78cf94d1b068a1db1a1634d815c001af6f (patch)
tree5692aa58565bc06197f7ebc48dc6846b225ef8a1 /libguile/gc.c
parent52b3923a9dbcc2660f593bef288a624e5c7ed696 (diff)
downloadguile-25748c78cf94d1b068a1db1a1634d815c001af6f.tar.gz
* stacks.c: Avoid compiler warning re: unitialized var.
* scmconfig.h.in: Added DEBUG_FREELIST * pairs.h: Fix macro that was not do-while(0) sandwiched. * gc.h, gc.c: Added scm_gc_set_debug_check_freelist_x, scm_map_free_list
Diffstat (limited to 'libguile/gc.c')
-rw-r--r--libguile/gc.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/libguile/gc.c b/libguile/gc.c
index a00c89228..98a5edc66 100644
--- a/libguile/gc.c
+++ b/libguile/gc.c
@@ -290,14 +290,28 @@ scm_check_freelist ()
}
static int scm_debug_check_freelist = 0;
+
+SCM_PROC (s_gc_set_debug_check_freelist_x, "gc-set-debug-check-freelist!", 1, 0, 0, scm_gc_set_debug_check_freelist_x);
+SCM
+scm_gc_set_debug_check_freelist_x (SCM flag)
+{
+ SCM_ASSERT(SCM_BOOL_T == flag || SCM_BOOL_F == flag,
+ flag, 1, s_gc_set_debug_check_freelist_x);
+ scm_debug_check_freelist = (SCM_BOOL_T==flag)? 1: 0;
+ return SCM_UNSPECIFIED;
+}
+
+
SCM
scm_debug_newcell (void)
{
SCM new;
scm_newcell_count++;
- if (scm_debug_check_freelist)
+ if (scm_debug_check_freelist) {
scm_check_freelist ();
+ scm_gc();
+ }
/* The rest of this is supposed to be identical to the SCM_NEWCELL
macro. */