Use JEMALLOC_ATTR(tls_model("initial-exec)) instead of -ftls-model=initial-exec so that libjemalloc_pic.a can be directly linked into another library without needing linker options changes. Add attributes to malloc, calloc, and posix_memalign, for compatibility with glibc's declarations. Add function prototypes for the standard malloc(3) API.
jemalloc is a general-purpose scalable concurrent malloc(3) implementation. The INSTALL file contains information on how to configure, build, and install jemalloc.