public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Richard Guenther <rguenther@suse.de>
Cc: Paolo Carlini <paolo.carlini@oracle.com>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Decrease integer-share-limit
Date: Thu, 16 Aug 2012 14:59:00 -0000	[thread overview]
Message-ID: <20120816145705.GK1999@tucnak.redhat.com> (raw)
In-Reply-To: <alpine.LNX.2.00.1208161643190.28649@zhemvz.fhfr.qr>

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

  reply	other threads:[~2012-08-16 14:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-16 13:41 Richard Guenther
2012-08-16 14:37 ` Paolo Carlini
2012-08-16 14:46   ` Richard Guenther
2012-08-16 14:59     ` Jakub Jelinek [this message]
2012-08-17  7:52       ` Richard Guenther

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120816145705.GK1999@tucnak.redhat.com \
    --to=jakub@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=paolo.carlini@oracle.com \
    --cc=rguenther@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).