Lightweight memory leak debugging on linux

前端 未结 8 1298
别那么骄傲
别那么骄傲 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

    0 讨论(0)
  • 2021-01-30 10:27

    memleax should work for you.

    It debugs memory leak of a running process by attaching it, without recompiling program or restarting target process. It's very convenient and suitable for production environment.

    It TRAPs only for malloc/free() calls, so it should bring less performace impact than Vagrild.

    It works on GNU/Linux-x86_64 and FreeBSD-amd64.

    NOTE: I'm the author, any suggestion is welcomed

    0 讨论(0)
提交回复
热议问题