Lightweight memory leak debugging on linux

前端 未结 8 1323
别那么骄傲
别那么骄傲 2021-01-30 09:33

I looked for existing answers first and saw that Valgrind is everyone’s favorite tool for memory leak debugging on linux. Unfortunately Valgrind does not seem

8条回答
  •  无人共我
    2021-01-30 10:24

    You might also consider using Google's gperftools, which has a heap profiler that can be loaded via LD_PRELOAD. You can also link in its tcmalloc and leak checker into your binary, and enable them only when needed.

    For details, see https://github.com/gperftools/gperftools

提交回复
热议问题