public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Davidlohr Bueso <dave@gnu.org>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>,
	Ingo Molnar <mingo@elte.hu>, Paul Mackerras <paulus@samba.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] perf: add GCC optimization to memory allocating functions
Date: Fri, 26 Nov 2010 10:36:02 -0300	[thread overview]
Message-ID: <1290778562.2373.3.camel@cowboy> (raw)
In-Reply-To: <1290778040.2145.145.camel@laptop>

On Fri, 2010-11-26 at 14:27 +0100, Peter Zijlstra wrote:
> On Fri, 2010-11-26 at 10:24 -0300, Davidlohr Bueso wrote:
> > From: Davidlohr Bueso <dave@gnu.org>
> > 
> > We can benefit from the alloc_size attribute in xrealloc and zalloc.
> 
> What's this alloc_size attribute do?
> 
Quoting from http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html:

"The alloc_size attribute is used to tell the compiler that the function
return value points to memory, where the size is given by one or two of
the functions parameters. GCC uses this information to improve the
correctness of __builtin_object_size."


      reply	other threads:[~2010-11-26 13:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-26 13:24 [PATCH] perf: add GCC optimization to memory allocating functions Davidlohr Bueso
2010-11-26 13:27 ` Peter Zijlstra
2010-11-26 13:36   ` Davidlohr Bueso [this message]

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=1290778562.2373.3.camel@cowboy \
    --to=dave@gnu.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    /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