diff options
author | Han-Wen Nienhuys <hanwen@lilypond.org> | 2008-08-16 02:58:17 -0300 |
---|---|---|
committer | Han-Wen Nienhuys <hanwen@lilypond.org> | 2008-08-16 13:21:21 -0300 |
commit | 569aa529d5379f3c942fa6eb01e8a1ad48ba9f77 (patch) | |
tree | 0144f57fa2e58761e3a5f35dc2f9e22fd48c324c /libguile/struct.c | |
parent | b61b5d0ebea924ee4b3930b2cba72e282d4751c7 (diff) | |
download | guile-569aa529d5379f3c942fa6eb01e8a1ad48ba9f77.tar.gz |
Use word_2 to store mark bits for freeing structs and vtables in the
correct order.
This ensures that we only use GC Marks during the actual GC Mark.
Diffstat (limited to 'libguile/struct.c')
-rw-r--r-- | libguile/struct.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libguile/struct.c b/libguile/struct.c index 2d36303b4..ad88ac844 100644 --- a/libguile/struct.c +++ b/libguile/struct.c @@ -364,7 +364,7 @@ scm_free_structs (void *dummy1 SCM_UNUSED, { SCM vtable = SCM_STRUCT_VTABLE (chain); if (SCM_STRUCT_GC_CHAIN (vtable) != 0 && vtable != chain) - SCM_SET_GC_MARK (vtable); + SCM_SET_STRUCT_MARK (vtable); chain = SCM_STRUCT_GC_CHAIN (chain); } /* Free unmarked structs. */ @@ -374,9 +374,9 @@ scm_free_structs (void *dummy1 SCM_UNUSED, { SCM obj = chain; chain = SCM_STRUCT_GC_CHAIN (chain); - if (SCM_GC_MARK_P (obj)) + if (SCM_STRUCT_MARK_P (obj)) { - SCM_CLEAR_GC_MARK (obj); + SCM_CLEAR_STRUCT_MARK (obj); SCM_SET_STRUCT_GC_CHAIN (obj, newchain); newchain = obj; } @@ -897,8 +897,8 @@ scm_struct_prehistory () { scm_i_structs_to_free = SCM_EOL; scm_c_hook_add (&scm_before_sweep_c_hook, scm_struct_gc_init, 0, 0); - /* With the new lazy sweep GC, the point at which the entire heap is - swept is just before the mark phase. */ + /* With lazy sweep GC, the point at which the entire heap is swept + is just before the mark phase. */ scm_c_hook_add (&scm_before_mark_c_hook, scm_free_structs, 0, 0); } |