This is an automated email from the ASF dual-hosted git repository.

bmahler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git


The following commit(s) were added to refs/heads/master by this push:
     new 06ac8127d Added ENABLE_JEMALLOC_ALLOCATOR macro.
06ac8127d is described below

commit 06ac8127db35c16991f7c8011aa2ad9b2fdcc585
Author: Ilya Pronin <[email protected]>
AuthorDate: Mon Aug 1 12:07:16 2022 -0700

    Added ENABLE_JEMALLOC_ALLOCATOR macro.
    
    Summary:
    The macro is used in the agent code to determine if jemalloc was enabled
    in the build and provide a custom allocator configuration in the form of
    a global malloc_conf variable.
    
    This commit follows from 
https://github.com/apache/mesos/commit/2836057c8881a62139b5db1f175d3d027bf2e645.
    View the commit for more details.
    
    Test Plan:
    Modified the agent code to print whether the macro is defined or not
    and tested on an integration test host.
---
 cmake/CompilationConfigure.cmake | 4 ++++
 configure.ac                     | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/cmake/CompilationConfigure.cmake b/cmake/CompilationConfigure.cmake
index ce99cf10b..072b9f9f8 100644
--- a/cmake/CompilationConfigure.cmake
+++ b/cmake/CompilationConfigure.cmake
@@ -491,6 +491,10 @@ if (LINUX)
     "Use jemalloc as memory allocator for the master and agent binaries."
     FALSE)
 
+  if (ENABLE_JEMALLOC_ALLOCATOR)
+    add_definitions(-DENABLE_JEMALLOC_ALLOCATOR)
+  endif ()
+
   option(ENABLE_XFS_DISK_ISOLATOR
     "Whether to enable the XFS disk isolator."
     FALSE)
diff --git a/configure.ac b/configure.ac
index b2e038172..542fd52b1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1306,6 +1306,8 @@ correct if you're already doing this.
   else
     with_bundled_jemalloc=yes
   fi
+
+  AC_DEFINE([ENABLE_JEMALLOC_ALLOCATOR])
 fi
 
 AC_SUBST(WITH_JEMALLOC)

Reply via email to