Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 May 2013 08:42:39 +0200
From:      Jeremie Le Hen <jlh@FreeBSD.org>
To:        Marcel Moolenaar <marcel@FreeBSD.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r250991 - in head: contrib/jemalloc/include/jemalloc include lib/libc/stdlib/jemalloc
Message-ID:  <20130531064239.GF70224@caravan.chchile.org>
In-Reply-To: <201305251859.r4PIxChc053341@svn.freebsd.org>
References:  <201305251859.r4PIxChc053341@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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@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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130531064239.GF70224>