This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: malloc attributes and realloc
"Kaveh R. Ghazi" <ghazi@caip.rutgers.edu> writes:
> 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.
>
> Note many (most?) allocation in GCC occurs in other functions besides
> the few libiberty functions with the attribute. So I think the
> optimization is pretty good to get as much as it does.
Hmm. Wanna put ATTRIBUTE_MALLOC on ggc_alloc* in ggc.h and see what
kind of speedup you get?
zw