Re: [Gc] C optimizer hazards in practice
Richard Brooksby <[email protected]> Tue, 15 Jul 2014 15:01:55 +0100
| Newsgroups | gmane.comp.programming.garbage-collection.boehmgc |
|---|---|
| Message-ID | <[email protected]> |
On 2014-07-14, at 05:43, Hans Boehm <[email protected]> wrote: > I think the question was about a compiler, under the covers, maintaining the last pointer in a form no longer recognizable by a conservative garbage collector, possibly only temporarily. ... In our case, the compiler has encoded the last reference to an object that it otherwise unreachable, and indeed is about to be recycled anyway. This is one of the things that makes this difficult to reproduce. A slight delay in recycling the memory and nobody notices. > Compiler dead variable elimination is a problem only in the sense that cases like this don't matter if the compiler also keeps a copy of the original base variable around. Right. If the compiler can prove that the variable containing the last reference isn't used again then it's a *good* thing if it overwrites it and hides it from the GC. One less object to preserve though another GC cycle. We're close to a repro with BDWGC. It's not as aggressive at reusing memory as the MPS when it's using the mostly-copying pool.