From edb61e7caf9788536718a871c2d7d0de7a6f42a0 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Fri, 9 Jul 2021 16:49:21 +0800 Subject: [PATCH] Hotfix/sangshuduo/td 3973 use jemalloc for master (#6820) * [TD-3973]: add jemalloc as submodule. * [TD-3973]: add jemalloc as submodule. * [TD-3973]: use jemalloc. build works as following instructions: cmake .. -DJEMALLOC_ENABLED=true make * fix jemalloc at tag 5.2.1 * fix conflicts * make install works. * fix conflicts. * release script works. * fix typo * [TD-3937]: support jemalloc add install funtion to all scripts. * adjust install_jemalloc() position for check compatibility. * fix position bug. * add ldconfig for jemalloc library cache refresh. * cherry pick from develop branch. * cherry pick from develop branch. * fix install_jemalloc() in install_client.sh. Co-authored-by: Shuduo Sang --- packaging/tools/install_client.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packaging/tools/install_client.sh b/packaging/tools/install_client.sh index 9044f23672..aa09013e53 100755 --- a/packaging/tools/install_client.sh +++ b/packaging/tools/install_client.sh @@ -182,7 +182,13 @@ function install_jemalloc() { ${csudo} /usr/bin/install -c -d /usr/local/share/man/man3 ${csudo} /usr/bin/install -c -m 644 ${jemalloc_dir}/share/man/man3/jemalloc.3 /usr/local/share/man/man3 fi - ${csudo} ldconfig + + if [ -d /etc/ld.so.conf.d ]; then + ${csudo} echo "/usr/local/lib" > /etc/ld.so.conf.d/jemalloc.conf + ${csudo} ldconfig + else + echo "/etc/ld.so.conf.d not found!" + fi fi } -- GitLab