Re: [Gc] win32 special treatment in GC_add_roots and GC_remove_roots codepaths
ivmai at mail.ru
Sun Sep 18 23:57:05 PDT 2011
13 09 2011, 18:25 Lucas Meijer <lucas at lucasmeijer.com>:
> Hi Ivan, thanks for your reply.
> I could take a stab at this, however I don't fully understand the
> problem yet:
> GC_remove_roots_inner seems not to do the correct thing when the root
> has been expanded due to the addition of another rootset.
> It looks to me that scenario is "not implemented yet" on any platform.
> not just win32.
We don't need this scenario for non-win32 as we don't "Spend the time to ensure that there are no overlapping or adjacent intervals." there.
> Is there any special reason why win32 cannot follow the codepath of line
> 219->225 of mark_rts.c,
It does not prevent from emerging overlapping areas, and, in case of win32, it seems it caused significant time waste (I'm not 100% sure of it).
> and the ifdef of line 299 of mark_rts.c being removed, like all other
> platforms do,
> so at least win32 would get support for unregistering of roots that have
> not been expanded.
> (all line numbers from mark_rts.c from master on github)
> Bye, Lucas
> > Hi Lucas,
> > In short words: it is possible to implement but no one spent his time on it yet.
> > If you feel you could do it - great - send me a patch (against "master" branch).
> > Regards.
> > 13 09 2011, 00:20 Lucas Meijer<lucas at lucasmeijer.com>:
> >> Hi,
> >> in GC_add_roots_inner there are is a win32 codepath and a nonwin32 codepath
> >> for detecting if there is an overlap/adjacent rootset already present. if so it
> >> extends the existing rootset to fully include the newly added rootset.
> >> GC-remove_roots is not implemented on win32.
> >> I'm hoping someone can explain why the nonwin32 codepath is required. On a quick
> >> experiment, making win32 use the nonwin32 codepath, things "seem" to work fine,
> >> and allow me to unregister roots.
> >> A message on this mailinglist, Ivan writes:
> >> "In theory, it's possible to implement GC_remove_roots() for Win32.
> >> But, it is complicated due to overlapping/adjacent regions processing."
> >> This statement puzzles me, as the non Win32 codepath also does
> >> overlapped-roots-collapsing, so it would seem to be it would suffer from the
> >> same problem of unregistering being unsuccessful in the case where the rootset
> >> has been expanded.
> >> What is so special about win32?
> >> Thanks,
> >> Lucas
> >> _______________________________________________
> >> Gc mailing list
> >> Gc at linux.hpl.hp.com
> >> https://www.hpl.hp.com/hosted/linux/mail-archives/gc/
More information about the Gc