Branch: refs/heads/master Home: https://github.com/synfig/synfig Commit: 78f08a426835a98dcc40c4cc458218b05710b939 https://github.com/synfig/synfig/commit/78f08a426835a98dcc40c4cc458218b05710b939 Author: ice0 <konop...@gmail.com> Date: 2022-05-08 (Sun, 08 May 2022)
Changed paths: M CMakeLists.txt M synfig-core/src/tool/CMakeLists.txt M synfig-studio/src/gui/CMakeLists.txt Log Message: ----------- [CMake] Added option to link with tcmalloc library (#2602) Added option to link with tcmalloc library. This should help debug memory leaks. Usage: 1. install google-perf-tools package ``` sudo apt-get install google-perftools ``` 2. Enable linking with tcmalloc library: ``` cmake -DENABLE_TCMALLOC=ON ... ``` This option just adds `-ltcmalloc` to `synfig` and `synfigstudio` binaries. 3. Build binaries and enable heap profiling: ``` env HEAPPROFILE=synfig ./synfig ... ``` This should create `synfig.00xx.heap` files in current folder while running. More details about tcmalloc options here: https://gperftools.github.io/gperftools/heapprofile.html 4. Install visualizer dependencies (gv, graphviz): ``` sudo apt install graphviz gv ``` 5. Comparing profiles: ``` google-pprof --gv --base=synfig.0002.heap ./synfigstudio synfig.0004.heap ``` This will show where memory is allocated. _______________________________________________ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl