libiberty: Don't needlessly clear xmemdup allocated memory

DJ Delorie dj@redhat.com
Sun May 29 02:12:00 GMT 2016


Alan Modra <amodra@gmail.com> writes:
> 	* xmemdup.c (xmemdup): Use xmalloc rather than xcalloc.

In glibc at least, calloc can be faster than memset if the kernel is
pre-zero-ing pages.  Thus, in those cases, your change makes the code
slower by adding an unneeded memset.  Have you considered these cases?



More information about the Binutils mailing list