Copying collection and our ggc_collect practices

Daniel Berlin dberlin@dberlin.org
Wed Sep 17 19:39:00 GMT 2003



On Wed, 17 Sep 2003, Zack Weinberg wrote:

> Daniel Berlin <dberlin@dberlin.org> writes:
>
> > Currently, gcc has a bad habit of keeping ggc_alloc'd pointers in unmarked
> > local variables, and expecting the addresses not to change over a
> > ggc_collect.
> >
> > This of course, prevents us from doing copying collection.
>
> Could you give examples?

Sure, here's one.

In cgraphunit.c, cgraph_expand_functions stores cgraph_node * (which are
ggc_alloc'd) in the order array, which is xcalloc'd and unmarked.  It calls
cgraph_expand_function which calls the expand_function hook which calls
ggc_collect.




More information about the Gcc mailing list