Please sign in to comment.
Move linking with jemalloc (and tcmalloc) first in the list
Jemalloc transparently enables multi-threading support (and starts using thread-caching) as soon as an application starts spawning threads. In order to detect this it intercepts calls to pthread_create using symbol interposition. This only works in case jemalloc appears before pthread in the symbol lookup scope. This patch moves jemalloc linking first in the list, so that it appears before pthread and it can correctly interpose on its symbols. tcmalloc and its profiler are also moved there for consistency. Finally jemalloc is now enabled in the options, so that it gets used if installed.
- Loading branch information...
Showing with 15 additions and 15 deletions.