diff options
author | Han-Wen Nienhuys <hanwen@lilypond.org> | 2002-08-08 19:47:31 +0000 |
---|---|---|
committer | Han-Wen Nienhuys <hanwen@lilypond.org> | 2002-08-08 19:47:31 +0000 |
commit | eab1b25970c21df7da67bd8f48290a1a1e1bf3d7 (patch) | |
tree | 5e1a7d34544a58ef5ddce7f51762b60189325ff6 /libguile/gc-mark.c | |
parent | 00706edc1de5c13bc0552eedf8eec9a5a7ed8802 (diff) | |
download | guile-eab1b25970c21df7da67bd8f48290a1a1e1bf3d7.tar.gz |
* gc.h: add scm_debug_cells_gc_interval to public interface
* gc-card.c ("sweep_card"): set scm_gc_running while sweeping.
* gc.c (scm_i_expensive_validation_check): separate expensive
validation checks from cheap ones.
Diffstat (limited to 'libguile/gc-mark.c')
-rw-r--r-- | libguile/gc-mark.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/libguile/gc-mark.c b/libguile/gc-mark.c index 466874ad2..d7414d648 100644 --- a/libguile/gc-mark.c +++ b/libguile/gc-mark.c @@ -83,9 +83,6 @@ extern unsigned long * __libc_ia64_register_backing_store_base; #include <unistd.h> #endif - - - #ifdef __ia64__ # define SCM_MARK_BACKING_STORE() do { \ ucontext_t ctx; \ @@ -101,6 +98,7 @@ extern unsigned long * __libc_ia64_register_backing_store_base; # define SCM_MARK_BACKING_STORE() #endif + /* Entry point for this file. */ @@ -108,10 +106,10 @@ void scm_mark_all (void) { long j; - + scm_i_clear_mark_space (); - + #ifndef USE_THREADS /* Mark objects on the C stack. */ @@ -157,12 +155,14 @@ scm_mark_all (void) } } } + /* FIXME: we should have a means to register C functions to be run * in different phases of GC */ scm_mark_subr_table (); + #ifndef USE_THREADS scm_gc_mark (scm_root->handle); #endif @@ -171,7 +171,6 @@ scm_mark_all (void) /* {Mark/Sweep} */ - /* Mark an object precisely, then recurse. */ @@ -182,7 +181,9 @@ scm_gc_mark (SCM ptr) return ; if (SCM_GC_MARK_P (ptr)) - return; + { + return; + } SCM_SET_GC_MARK (ptr); scm_gc_mark_dependencies (ptr); @@ -475,9 +476,12 @@ gc_mark_loop: } if (SCM_GC_MARK_P (ptr)) + { return; - + } + SCM_SET_GC_MARK (ptr); + goto scm_mark_dependencies_again; } @@ -485,6 +489,7 @@ gc_mark_loop: + /* Mark a region conservatively */ void scm_mark_locations (SCM_STACKITEM x[], unsigned long n) @@ -570,4 +575,3 @@ scm_gc_init_mark(void) #endif } - |