This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: GC special object sizes
- From: Zack Weinberg <zack at codesourcery dot com>
- To: Steven Bosscher <s dot bosscher at student dot tudelft dot nl>
- Cc: Diego Novillo <dnovillo at redhat dot com>, Geoff Keating <geoffk at geoffk dot org>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 05 May 2003 23:24:48 -0700
- Subject: Re: GC special object sizes
- References: <1051633938.7385.68.camel@steven><jm7k9d6tq9.fsf@desire.geoffk.org> <1051641364.7385.80.camel@steven><1051717586.731.160.camel@steven><1052177724.2909.164.camel@frodo.toronto.redhat.com><1052185839.724.216.camel@steven>
Steven Bosscher <s.bosscher@student.tudelft.nl> writes:
> If there was an elegant check to see if an extra_order_size was a power
> of two, I would implement it so that we'd ignore extra page orders for
> such sizes in init_ggc in ggc-page. (This would also allow us to have
> fire-and-forget page orders for things like identifier nodes which have
> different sizes for each language.)
> But so far I couldn't come up with something (haven't tried anything)...
init_ggc has to merge the table of extra order sizes into the
size_lookup array anyway -- it can do a probe for a collision at that
point. You care about collisions within the extra_order_size_table as
well as with the power-of-two buckets.
As long as you're hacking the GC, you could implement something I've
been meaning to do for at least two years, which is allocate
everything bigger than half a page on a special "large object" chain
so that we do not waste ridiculous amounts of memory on them. We very
rarely need such objects, so they can go through a slow path.
zw