This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: [patch] Move loop structures to gc memory


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}


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