Le Tue, Jul 25, 2006 at 12:30:04PM -0500, David Nicol écrivait/wrote: > On 7/24/06, Laurynas Biveinis <[EMAIL PROTECTED]> wrote: > > >[How is it that setting pointers] to NULL can > >actually increase peak GC memory usage? > > I'll guess that during collection phases, the list of > collectible structures becomes longer. > > GCC is just too huge to try and implement reference counting > just to see what it would do, right? All managed structures would have > to include a base class with the count in it and all new references would > have to be through a macro...
Refcouting is also a nightmare for circular references. I suspect that GCC gimple trees has some circularities (I might be wrong, not having dived yet into the code). A theoritical alternative might be to use a precise copying collector like Qish. http://starynkevitch.net/Basile/qishintro.html In practice, this would be impractical (even if the GTY marker could help) because it requires changing a lot of code. I've got no explanation regarding zero-ing pointers penalties. Maybe (just a guess) some cache effect? Regards -- Basile STARYNKEVITCH http://starynkevitch.net/Basile/ email: basile<at>starynkevitch<dot>net aliases: basile<at>tunes<dot>org = bstarynk<at>nerim<dot>net 8, rue de la Faïencerie, 92340 Bourg La Reine, France