Static library usage

Adam Fried-Gintis jemalloc at icosm.net
Wed Mar 20 15:10:59 PDT 2013


Sorry, should have mentioned that. CentOS 5.6.

--
Adam Fried-Gintis

On Wed, Mar 20, 2013 at 12:11 PM, Jason Evans <jasone at canonware.com> wrote:

> On Mar 20, 2013, at 9:49 AM, Adam Fried-Gintis <jemalloc at icosm.net> wrote:
> > I've noticed that when linking with the static libjemalloc(_pic).a,
> initialization does not occur unless you make a jemalloc call within your
> code. In other words, I have to call something like malloc_stats_print() or
> malloc_usable_size() to get jemalloc initialized. If I don't do this, the
> normal malloc continues to be used. This is different from the behavior of
> the shared library. Is this a limitation somewhere, or a bug, or even a
> autogen/configure setting that I missed? If it can't be changed/fixed, it
> would be great to see this documented - it's certainly not obvious.
>
> This sounds like a weird side effect of lazy run-time symbol resolution in
> the operating system's dynamic loader.  What platform is this happening on?
>
> Jason
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jemalloc.net/mailman/jemalloc-discuss/attachments/20130320/1768f624/attachment.html>


More information about the jemalloc-discuss mailing list