pan3793 commented on code in PR #1824:
URL: 
https://github.com/apache/incubator-celeborn/pull/1824#discussion_r1319725336


##########
sbin/load-celeborn-env.sh:
##########
@@ -69,3 +69,24 @@ if [ "$CELEBORN_PID_DIR" = "" ]; then
   export CELEBORN_PID_DIR="${CELEBORN_HOME}/pids"
 fi
 
+# jemalloc memory allocator is enabled by default, you may set 
DISABLE_JEMALLOC to true in celeborn-env.sh if it's not as you wish.
+maybe_enable_jemalloc() {
+  if [ "${DISABLE_JEMALLOC:-false}" == "false" ]; then
+    JEMALLOC_PATH="/usr/lib/$(uname -m)-linux-gnu/libjemalloc.so"
+    JEMALLOC_FALLBACK="/usr/lib/x86_64-linux-gnu/libjemalloc.so"
+    if [ -f "$JEMALLOC_PATH" ]; then
+      export LD_PRELOAD=$LD_PRELOAD:$JEMALLOC_PATH
+    elif [ -f "$JEMALLOC_FALLBACK" ]; then
+      export LD_PRELOAD=$LD_PRELOAD:$JEMALLOC_FALLBACK
+    else
+      if [ "$JEMALLOC_PATH" == "$JEMALLOC_FALLBACK" ]; then
+        MSG_PATH=$JEMALLOC_PATH

Review Comment:
   ```suggestion
           MSG_PATH="$JEMALLOC_PATH"
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to