This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: C++ Garbage Collecter


  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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]