Configuring jemalloc on FreeBSD.
jasone at canonware.com
Sat Apr 16 20:00:05 PDT 2011
On 04/16/2011 09:10 AM, Mahadevan R wrote:
> jemalloc 2.2.1 tarball fails to ./configure on FreeBSD 8.2 (!),
> because of attempting to check for dlopen() in libdl (this is in libc
> for FreeBSD). The patch below fixes this.
The situation is actually quite a bit worse than this for the
stand-alone jemalloc on FreeBSD, mainly because the pthreads
implementation dynamically allocates many data structures, which makes
allocator bootstrapping hard. I recently spent a weekend working
through porting issues for FreeBSD, and tentatively came to the
conclusion that the best solution is to add a simple bootstrap allocator
facility to jemalloc. I haven't gotten as far as implementing that
though, so right now my development branch for FreeBSD still deadlocks
when calling pthread_key_create().
By the way, my general plan is to make it so that the stand-alone
jemalloc can be used via FreeBSD ports with no modifications, and can be
embedded in libc with only minimal glue. The stand-alone jemalloc is so
divergent from what is currently in FreeBSD's libc that I can't stomach
the prospect of back-porting optimizations, of which there are many at
More information about the jemalloc-discuss