diff --git a/build_files/cmake/Modules/FindJeMalloc.cmake b/build_files/cmake/Modules/FindJeMalloc.cmake index afadf6c13a8..f69956e5ab4 100644 --- a/build_files/cmake/Modules/FindJeMalloc.cmake +++ b/build_files/cmake/Modules/FindJeMalloc.cmake @@ -47,15 +47,6 @@ find_library(JEMALLOC_LIBRARY lib64 lib ) -if(JEMALLOC_INCLUDE_DIR) - set(_version_regex "^#define[ \t]+JEMALLOC_VERSION[ \t]+\"([^\"]+)\".*") - file(STRINGS "${JEMALLOC_INCLUDE_DIR}/jemalloc.h" - JEMALLOC_VERSION REGEX "${_version_regex}") - string(REGEX REPLACE "${_version_regex}" "\\1" - JEMALLOC_VERSION "${JEMALLOC_VERSION}") - unset(_version_regex) -endif() - # handle the QUIETLY and REQUIRED arguments and set JEMALLOC_FOUND to TRUE if # all listed variables are TRUE include(FindPackageHandleStandardArgs) diff --git a/intern/guardedalloc/CMakeLists.txt b/intern/guardedalloc/CMakeLists.txt index 70af302d721..b41bbadc508 100644 --- a/intern/guardedalloc/CMakeLists.txt +++ b/intern/guardedalloc/CMakeLists.txt @@ -53,11 +53,8 @@ if(WIN32 AND NOT UNIX) endif() endif() -# Jemalloc 5.0.0+ needs extra configuration. if(WITH_MEM_JEMALLOC) - if(NOT ("${JEMALLOC_VERSION}" VERSION_LESS "5.0.0")) - add_definitions(-DWITH_JEMALLOC_CONF) - endif() + add_definitions(-DWITH_MEM_JEMALLOC) endif() blender_add_lib(bf_intern_guardedalloc "${SRC}" "${INC}" "${INC_SYS}" "${LIB}") diff --git a/intern/guardedalloc/intern/mallocn.cc b/intern/guardedalloc/intern/mallocn.cc index d09e908b918..d073a4e69d3 100644 --- a/intern/guardedalloc/intern/mallocn.cc +++ b/intern/guardedalloc/intern/mallocn.cc @@ -21,7 +21,7 @@ using namespace mem_guarded::internal; -#ifdef WITH_JEMALLOC_CONF +#ifdef WITH_MEM_JEMALLOC /** * If JEMALLOC is used, it reads this global variable and enables background * threads to purge dirty pages. Otherwise we release memory too slowly or not