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
Hello,
> Mike Stump <mrs@apple.com> writes:
>
> > On May 14, 2007, at 11:12 AM, Ian Lance Taylor wrote:
> > > In general I don't like any use of ggc_free.
> >
> > Do you prefer a slower compiler?
>
> I prefer moving data structures out of GC space. Unfortunately doing
> this fully requires fixing our GC implementation. Or, preferably,
> eliminating it.
>
> Using ggc_free with GC just puts us on the road back to the problems
> which led us to introduce GC in the first place: we didn't track our
> memory allocations properly, so we got confused and got weird crashes.
> We introduced GC so that it didn't matter whether we tracked our
> memory allocations properly or not. There was no other reason for GC.
> When we use ggc_free, we lose the whole point of having GC. It just
> does not make sense.
well, sort of. There are some structures that are hard to keep track of
(trees and rtl, and maybe a few others), and I think it is OK to have gc
for them. I guess most of the other thinks that are currently kept in
GC should not be, but it would be a bit hard to keep track of all GC
roots if we moved them out. Using ggc_free of course is not a nice
solution, but not using it for structures for that we are sure that they
are no longer reachable is wasteful.
Zdenek