This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Move loop structures to gc memory
Mike Stump <mrs@apple.com> writes:
> First, I don't really understand to what bug Ian refers to, so, I
> couldn't fix it, even if I wanted to. Second, I'd predict at this
> point, that even if the bug were fixed, it would not be as fast as
> ggc_free. If it isn't faster, I don't see what relevance it has to
> the two quoted above. And lastly, I don't think this issue was
> contained in either of those two messages, just for the record.
The bug, if it is indeed a bug, is that the set of GC roots is static.
If you want to have a dynamically allocated pointer into GC memory,
you must put that pointer into GC memory itself.
Fixing that, and using it for the loop structures, would not be slower
than using ggc_free. It would be a trade between recording the
dynamic root in some fashion on the one hand, and manipulating the
more complex data structures required by GC allocation on the other.
Ian