This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: malloc attributes and realloc
- From: Bruce Korb <bkorb at veritas dot com>
- To: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Cc: dewar at gnat dot com, gcc at gcc dot gnu dot org, gdr at integrable-solutions dot net, schwab at suse dot de
- Date: Sun, 04 Jan 2004 10:49:42 -0800
- Subject: Re: malloc attributes and realloc
- Organization: Home
- References: <20040104171316.5D54CF2D61@nile.gnat.com> <200401041840.i04Ieu9o020605@caip.rutgers.edu>
"Kaveh R. Ghazi" wrote:
>
> > The claim that #3 is a poor choice is based on the (almost certainly
> > correct, but not actually verified) assumption that the gains from
> > this optimization are negligible. Personally I think that's a safe
> > assumption (and I am dubious about the claims of significant gains in
> > the malloc case).
>
> Negligible is in the eye of the beholder.
>
> I've done tests, described the exact parameters and posted the results
> in terms of GCC compile-time difference. You're free to try any of
> the three experiments I did yourself and either confirm or refute my
> figures. But remaining suspicious in the absence of your own legwork
> doesn't carry much scientific weight.
But remember, your tests involved gcc_malloc, not realloc.
I believe there is complete consensus on malloc being malloc-like. :-)
The issue is regarding realloc.