[patch] Move loop structures to gc memory

Alexandre Oliva aoliva@redhat.com
Fri May 18 08:33:00 GMT 2007


On May 17, 2007, Zdenek Dvorak <rakdver@kam.mff.cuni.cz> wrote:

> no, it is a proper fix -- it makes us avoid using GC for purposes for
> that it is not suitable.

Why is it not suitable?

So far the only justification presented is that ggc_alloc is slower.
I'm not aware of any fundamental reason why ggc_alloc must be slower
than other memory allocators (other than alloca).

If we could make ggc_alloc faster, would it still be unsuitable?

> using GC for objects for that you know exactly the lifetime and the
> expected usage pattern at best wastes this extra information you
> have.

You're not taking into account the need for tracking the pointers
inside these very objects into objects in GC memory.  It's not at all
obvious that, after adding in this extra information, you're still
saving anything.

-- 
Alexandre Oliva         http://www.lsd.ic.unicamp.br/~oliva/
FSF Latin America Board Member         http://www.fsfla.org/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}



More information about the Gcc-patches mailing list