Han-Wen Nienhuys <hanw...@gmail.com> writes: > On Fri, Jan 24, 2020 at 10:51 AM David Kastrup <d...@gnu.org> wrote: > >> >> > What do you mean with "heap is collected"? >> >> "Collected" is probably the wrong expression. Sweeped and marked. The >> proposed behavior by Guile developers is not to bother with individual >> mark hooks and just let the whole heap be marked and sweeped. >> > > what is the documented way of disabling the hooks?
Just don't register them, I suppose. All of our Guile allocation stuff by now is supposed to be routed through the files lily/include/smobs.hh lily/include/smobs.tcc lily/include/small-smobs.hh lily/smobs.cc lily/undead.cc So disabling the registration hooks should not affect too many lines. I think just outcommenting the lines if (&Super::mark_smob != &Smob_base<Super>::mark_smob) scm_set_smob_mark (smob_tag_, Super::mark_trampoline); in lily/include/smobs.tcc should disable all hooks. At least there does not appear to be any other call to scm_set_smob_mark in the code base. > And are we supposed to include the BGC headers ourselves and issue > GC_blah commands directly? Oh no, just use the same mechanism as in Guile-1 (which is what we do currently). Using the hooks is seen as a second-class citizen, but after years of bug reports and nagging, our tests stopped crashing because of GC problems. -- David Kastrup