[PATCH] Decrease integer-share-limit

Jakub Jelinek jakub@redhat.com
Thu Aug 16 14:59:00 GMT 2012


On Thu, Aug 16, 2012 at 04:44:03PM +0200, Richard Guenther wrote:
> On Thu, 16 Aug 2012, Paolo Carlini wrote:
> > On 08/16/2012 03:39 PM, Richard Guenther wrote:
> > > This decreases the integer-share-limit to make sure the TREE_VEC we
> > > allocate for the small cached integers has a reasonable size for
> > > our GC memory allocator.
> > Out of curiosity (just in case you hav two spare minutes) do you have any idea
> > why this is so? I mean, naively one would think that allowing for any 8 bit
> > constant would be a nice idea; puzzlingly, however the comment in the code
> > says just "experimentation". I'm wondering if tweaking a bit the memory
> > allocator itself could allow for the full 8 bit range without a big memory
> > waste...
> 
> The GC memory allocator works on "pages", there are not pages of
> arbitrary size but only power-of-two sizes.  It's hard to improve
> the allocator here.

The allocations are either power-of-two, or a couple of extra listed sizes.
So, the alternative would be to add an extra size for the default integer
share limit vector.  See extra_order_size_table in ggc-page.c.  Of course
only provided there are many of those vectors.

	Jakub



More information about the Gcc-patches mailing list