Fix T54287: memory not freed after rendering on Linux.
[blender.git] / intern / guardedalloc / CMakeLists.txt
index 10ed42871851ac2f7b6d50f8d2a924c4ec6c868b..7f648cff27c8c97af931512e21800ec8efc7a82b 100644 (file)
@@ -53,6 +53,11 @@ if(WIN32 AND NOT UNIX)
        )
 endif()
 
+# Jemalloc 5.0.0+ needs extra configuration.
+if(WITH_MEM_JEMALLOC AND ("${JEMALLOC_VERSION}" VERSION_GREATER_EQUAL "5.0.0"))
+       add_definitions(-DWITH_JEMALLOC_CONF)
+endif()
+
 blender_add_lib(bf_intern_guardedalloc "${SRC}" "${INC}" "${INC_SYS}")
 
 # Override C++ alloc, optional.