From: Jan Nieuwenhuizen Date: Sun, 30 Jun 2002 15:17:12 +0000 (+0000) Subject: (mark_smob): don't mark parents, explain why. X-Git-Tag: release/1.5.64~2 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=4a9cacbac6985b76ab22a683ecb0cafc1491e3e0;p=lilypond.git (mark_smob): don't mark parents, explain why. --- diff --git a/ChangeLog b/ChangeLog index ba51941fb6..2c70e2ce7b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2002-06-30 Jan Nieuwenhuizen + * lily/grob.cc (mark_smob): don't mark parents, explain why. + * tex/lilyponddefs.tex: Define outputscale only once. 2002-06-29 Jan Nieuwenhuizen @@ -68,7 +70,7 @@ lists of grobs. This should fix the problems of lily in combination with pthreads/qthreads. - * lily/grob.cc (mark_smob): bugfix: mark X parent too. + * lily/grob.cc (mark_smob): bugfix: mark other parent too. 2002-06-23 Chris Jackson diff --git a/lily/break-substitution.cc b/lily/break-substitution.cc index 73c24c20e5..4f560e85cd 100644 --- a/lily/break-substitution.cc +++ b/lily/break-substitution.cc @@ -44,6 +44,15 @@ substitute_grob (Grob *sc) if (!line) return sc->self_scm(); + /* + We don't return SCM_UNDEFINED for + suicided grobs, for two reasons + + - it doesn't work (strange disappearing objects) + + - it forces us to mark the parents of a grob, leading to + a huge recursion in the GC routine. + */ /* This was introduced in 1.3.49 as a measure to prevent diff --git a/lily/grob.cc b/lily/grob.cc index 992c4c9e34..c39d0125bd 100644 --- a/lily/grob.cc +++ b/lily/grob.cc @@ -762,9 +762,15 @@ Grob::mark_smob (SCM ses) { scm_gc_mark (s->dim_cache_[a].offset_callbacks_); scm_gc_mark (s->dim_cache_[a].dimension_); - Grob *p = s->get_parent (Axis (a)); - if (p) - scm_gc_mark (p->self_scm ()); + + /* + don't mark the parents. The pointers in the mutable property + list form two tree like structures (one for X relations, one + for Y relations). Marking these can be done in limited stack + space. If we add the parents, we will jump between X and Y in + an erratic manner, leading to much more recursion depth (and + core dumps if we link to pthreads. + */ } if (s->original_l_)