This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: malloc attributes and realloc
> From: "Joseph S. Myers" <jsm@polyomino.org.uk>
>
> On Fri, 2 Jan 2004, Kaveh R. Ghazi wrote:
>
> > Another datapoint, I tried disabling the libiberty macro
> > ATTRIBUTE_MALLOC which is applied to several allocation functions in
> > libiberty like xmalloc, etc. I rebootstrapped GCC and found that
> > without the attribute it slowed down 1% to 1.5% compiling combine.c at
> > -g -O2.
>
> Can you measure a performance difference if you add the attribute to
> xrealloc?
It improved compilation time by around 0.5%.
Did we achieve consensus that having the attribute on (x)realloc is
appropriate? (Can you point out the confirming URLs? This
conversation has gone on for a bit...) If so I'll submit a patch to
put the attribute on both realloc and xrealloc.
--Kaveh
--
Kaveh R. Ghazi ghazi@caip.rutgers.edu