Move prof_sample_threshold initialization into prof_alloc_prep(), before using it to decide whether to capture a backtrace.
jemalloc is a general-purpose scalable concurrent malloc(3) implementation. The INSTALL file contains information on how to configure, build, and install jemalloc.