How to profile memory usage of a C program

前端 未结 4 400
鱼传尺愫
鱼传尺愫 2021-01-02 17:13

I need to figure out which part of a linux program that I am running, is taking how much (either percentage, or absolute) memory. I need to create a profile of multiple such

4条回答
  •  生来不讨喜
    2021-01-02 17:47

    You can use Google's perftools for memory profiling. The project provides a very fast, multi-threaded malloc implementation, a Heap profiler, a Heap checker and a CPU profiler.

提交回复
热议问题