[PATCH] Simplify TSD without TLS

Mike Hommey mh+jemalloc at glandium.org
Thu Apr 19 23:36:56 PDT 2012

On Thu, Apr 19, 2012 at 05:32:05PM -0700, Jason Evans wrote:
> Patch 6/11 did indeed expose a bug in the FreeBSD implementation --
> the cleanup function wasn't being called at all!  I've been thinking
> about how to include such tests, and two closely related ideas come to
> mind.  One is to add a --enable-unit-tests option that causes unit
> test entry points to be built into libjemalloc.  Then test programs
> can call those entry points.  I'm not super excited about this though,
> because it requires special build configuration to run all the tests.
> The other option is to build a libjemalloc_test that has these entry
> points built in, and link all tests against that instead of
> libjemalloc.  What do you think?  Any other ideas?

We could go with a variant of the latter: build a shared library off the
tests + libjemalloc_pic.a. And then have a program linked against that
library and calls all tests. That would also allow to get rid of the
Makefile glue to run the tests.

> > This patch queue closes on Mingw support. Next will be MSVC.
> Patch 11/11 (Add support for Mingw) doesn't apply after the various
> changes I made while applying the rest of your patches (and leaving
> out 6/11 and 7/11).  Can you please rebase and resend?

I'll rebase and squash a few things. For good measure, I'll resend the
remaining patch queue.


More information about the jemalloc-discuss mailing list