This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Copying collection and our ggc_collect practices
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.