svn commit: r250991 - in head: contrib/jemalloc/include/jemalloc include lib/libc/stdlib/jemalloc

Jeremie Le Hen jlh at FreeBSD.org
Fri May 31 06:42:48 UTC 2013


Hi Marcel,

On Sat, May 25, 2013 at 06:59:12PM +0000, Marcel Moolenaar wrote:
> Author: marcel
> Date: Sat May 25 18:59:11 2013
> New Revision: 250991
> URL: http://svnweb.freebsd.org/changeset/base/250991
> 
> Log:
>   Make the malloc(3) family of functions weak and make their non-weak
>   implementations visible for use by applications. The functions $F that
>   are now weak symbols are:
>   	allocm, calloc, dallocm, free, malloc, malloc_usable_size,
>   	nallocm, posix_memalign, rallocm, realloc, sallocm
>   
>   The non-weak implementations of $F are exported as __$F.
>   
>   Submitted by:	stevek at juniper.net
>   Reviewed by:	jasone@, kib@
>   Approved by:	jasone@ (jemalloc)
>   Obtained from:	juniper Networks, Inc

I don't understand what this brings.  If an application want to override
malloc() et al., it can just do it and the dynamic linker won't look up
the libc's version.

Would you mind giving an example of what is now possible with this
change?

Thanks,
-- 
Jeremie Le Hen

Scientists say the world is made up of Protons, Neutrons and Electrons.
They forgot to mention Morons.


More information about the svn-src-all mailing list