This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C++ Garbage Collecter
- To: Kevin Atkinson <kevinatk at home dot com>
- Subject: Re: C++ Garbage Collecter
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Fri, 27 Aug 1999 01:36:54 -0600
- cc: Per Bothner <per at bothner dot com>, gcc at gcc dot gnu dot org
- Reply-To: law at cygnus dot com
In message <37C63D20.3F912988@home.com>you write:
> Per Bothner wrote:
>
> > Again, it seems that "pointer unsafety" is a mostly hypothetical problem,
> > *assuming* you don't replace all your mallocs by gcmalloc, or otherwise
> > use gcmalloc when malloc is more appropriate.
>
> What type of experience do you have with gcc C/C++ code and garbage
> collectors. Jeff, being a major gcc developer, is making me nervous
> here.
Per's got more than a clue :-) We just approach problems from different
directions. He's got a lot more experience with garbage collection and
front-ends while my experience is mostly in the backend and optimizers.
> I want to use a garbage collator to improve development time and avoid
> memory leeks. However, it won't be worth it to me if I have to spend
> most of my time tracking down errors due to pointer unsafety.
Even though I know the potential for losing exists, I've never seen it happen
in practice.
That could be because I do not spend a lot of time working with code that does
garbage collection, or because gcc is not as aggressive with these kinds of
opts as it should be. Also keep in mind the problem only occurs if you have
these weird opts and you fire up the collector in the window where the
compiler has scrambled your code beyond imagination.
jeff