Hi,

There is a root list, generated by gengtype from parsing the files
looking for those GTY markers.

So, if you look at ggc_mark_roots, you can see the walker that is
walking the root table.

If you look in your *build* directory, and grep for ggc_root_tab, you
will see where the roots are.

Thanks, that's exactly what I didn't know :)

Again, these are all auto-generated from gengtype.  You can simply
register them with boehm once gcc starts, because the root set never
changes.

As far as I can understand, current GGC-ors do not simply register
them as a additional roots - they walk them all the way down by the
pointers and mark stuff as required during collection. Now, if I add
the roots to Boehm's GC, this traversal and marking will be done
internally by Boehm's GC. The question is, does GCC have any data
structures looking like this: root -> some GC'ed memory -> some
malloc'ed memory -> some GC'ed memory (or similar)?  Such cases should
be OK with current GGC schemes, but Boehm's GC would be lost here.

One thing i should mention to you at this point, if you haven't
discovered yet, is that it is *not safe* to do collections in between
ggc_collect calls right now (IE when ggc_alloc is called).

Noted. I didn't know that.

--
Laurynas

Reply via email to