diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-10-03 12:10:08 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-10-03 13:09:31 +0300 |
commit | d2da3af073a63b6ae25119ebbd2e0d3c9a1b6823 (patch) | |
tree | c29a832a85eedc8628568115ed5530fe3f49587f /intern/guardedalloc/CMakeLists.txt | |
parent | bf37c93533a64011437fd29235fe8bfd3eedd589 (diff) |
Fix T54287: memory not freed after rendering on Linux.
With new jemalloc versions memory allocated by threads that then become
inactive is not longer automatically freed. Instead we have to enable a
background thread to do it.
Some testing is needed to find out of this is sufficient, because the
background thread only runs periodically.
Diffstat (limited to 'intern/guardedalloc/CMakeLists.txt')
-rw-r--r-- | intern/guardedalloc/CMakeLists.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/intern/guardedalloc/CMakeLists.txt b/intern/guardedalloc/CMakeLists.txt index 10ed4287185..7f648cff27c 100644 --- a/intern/guardedalloc/CMakeLists.txt +++ b/intern/guardedalloc/CMakeLists.txt @@ -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. |