Closed
Description
Currently user needs to pass -ljemalloc
linker flag if uses jemalloc pool (jemalloc_pool.a)
This is an issue as jemalloc exports malloc, realloc, free symbols, so actually liking with jemalloc overrides system functions.
That is annoying for the user, who don't want to use jmalloc instead of glibc functions.
This is also a problem for proxy lib's threshold #883 as dlsym(RTLD_NEXT, "malloc");
will return malloc@jemalloc not malloc@glibc. See also #894.
to overcome this issue we can:
- use dlopen, and dlsym in jemalloc_pool
- link statically with jemaloc in jemalloc_pool
Not sure what is a better approach.