在Linux中监视程序的内存使用情况 [英] monitor a program's memory usage in Linux

查看:206
本文介绍了在Linux中监视程序的内存使用情况的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Linux中有没有可用的图形或文本显示程序的内存使用的工具?例如,如果我写一个C ++程序,并想要验证对象是否正确分配和释放在内存中,是否有可用的应用程序可视化显示被实例化和删除的对象?当我在Visual Studio中编程时,我记得步进一个程序,并使用调试窗格来监视内存使用情况,并寻找类似于Linux中的东西。

Are there any tools available in Linux which graphically or textually display memory usage for a program? For example, if I write a C++ program and would like to verify that objects are being allocated and deallocated properly in memory, are there applications available that would visually show the objects being instantiated and deleted? When I used to program in Visual Studio, I remember stepping through a program and using a debug pane to monitor memory usage and am looking for something similar to that in Linux.

推荐答案

这不是你想要的,但看看 Valgrind

It's not exactly what you are looking for, but have a look at Valgrind.

这篇关于在Linux中监视程序的内存使用情况的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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