[英]How to dlopen jemalloc dynamic library
I am trying to dlopen
memory allocators at runtime. 我正在尝试在运行时
dlopen
内存分配器。 I have no problem with libc
, tcmalloc
and tbbmalloc
. 我对
libc
, tcmalloc
和tbbmalloc
没问题。 But trying to dlopen
jemalloc
results in the following error (caught via dlerror
) : 但是尝试
dlopen
jemalloc
导致以下错误(通过dlerror
捕获):
/path/to/lib/libjemalloc.so: cannot allocate memory in static TLS block
Do you have any idea of the reason for this error and hence how I could tackle this ? 您是否知道此错误的原因,因此我该如何解决?
I was able to find a solution to this thanks to jemalloc
's GitHub repository issue #1237 . 由于
jemalloc
的GitHub存储库问题#1237,我能够找到解决方案。
This solution was to recompile jemalloc
using the --disable-initial-exec-tls
according to the INSTALL.md , my bad. 该解决方案是根据INSTALL.md使用
--disable-initial-exec-tls
重新编译jemalloc
,这很不好。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.