如何分析内存使用情况? [英] How to profile memory usage?

查看:137
本文介绍了如何分析内存使用情况?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道Valgrind,但它只是检测内存管理问题。我搜索的是一个工具,给我一个概述,我的程序的哪些部分消耗多少内存。例如,一个树映射(如KCachegrind对Callgrind所做的)会很酷。

I am aware of Valgrind, but it just detects memory management issues. What I am searching is a tool that gives me an overview, which parts of my program do consume how much memory. A graphical representation with e.g. a tree map (as KCachegrind does for Callgrind) would be cool.

我在Linux机器上工作,所以Windows工具不会帮助我。 >

I am working on a Linux machine, so windows tools will not help me very much.

推荐答案

使用 massif 它是Valgrind工具的一部分。 massif-visualizer 可以帮助您绘制数据图形,或者只需使用 ms_print 命令。

Use massif which is part of the Valgrind tools. massif-visualizer can help you graph the data or you can just use the ms_print command.

这篇关于如何分析内存使用情况?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆