This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: GGC ICEs
[ I added Mark to the CC: as I believe he has expressed an opinion on
this matter in the past. ]
Ian Lance Taylor <iant@google.com> writes:
| Mike Stump <mrs@apple.com> writes:
|
| > On Jan 16, 2007, at 1:46 PM, Ian Lance Taylor wrote:
| > > I don't think we should ever call ggc_free.
| >
| > Do you think there is no performance benefit to releasing memory for
| > reuse, or that we should just not care about that performance loss?
| > What type of loss are you willing to throw away?
| >
| > I'm interested enough in compile time performance to want to
| > encourage the use of ggc_free. I'm happy to limiting it to cases
| > that might recover n% of used memory, if you want, we can quibble
| > over n. At 1%, not sure it is worth it. When n hits 50% or a couple
| > of hundred megabytes, I'd rather ggc_free be called. Also, I suspect
| > ggc_allocate/ggc_free is faster than malloc/free on some systems.
|
| We used to free memory when we didn't need it any more. We stopped
| doing that. Why? Because it turned out to be error prone. The fix
| we chose to implement was garbage collection. I have many
| reservations about using garbage collection in gcc. But it does have
| one huge advantage: we no longer have errors in which memory was freed
| while we are still holding a reference to it (barring the occasional
| missing GTY marker).
My recollection -- Mark, please correct me -- is that we introduced
the garbage collection as a stop gap to those nasty bugs we had
because we were not disciplined or systematic about allocation. I also
remember that, there were sentiments we should move to more
disciplined allocation systems, where we use structures that mirror
(in more obvious ways) lifetime of objects we manipulate. For example,
Mark?
-- Gaby
- References:
- [ping] Pre-inline optimization, version 2
- Pre-inline optimization, version 3
- Re: Pre-inline optimization, version 3
- Re: Pre-inline optimization, version 3
- Re: Pre-inline optimization, version 3
- Re: Pre-inline optimization, version 3
- Re: Pre-inline optimization, version 3
- Re: Pre-inline optimization, version 3
- Re: Pre-inline optimization, version 3
- Re: Pre-inline optimization, version 3
- GGC ICEs
- Re: GGC ICEs
- Re: GGC ICEs
- Re: GGC ICEs
- Re: GGC ICEs