如何分析共享内存? [英] How to profile shared memory?

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

问题描述

我有一个程序,该程序的峰值内存使用量为66MB,我正在尝试使用Valgrind Massif进行分析.不幸的是,Massif仅显示了800KB的峰值内存使用量.另一方面,top告诉我65MB是共享内存.可以在Linux中分析程序的共享内存使用情况吗?

I have a program that has a peak memory usage of 66MB that I'm trying to profile with Valgrind Massif. Unfortunately, Massif shows only 800KB of peak memory usage. On the other hand, top tells me that 65MB are shared memory. Is it possible to profile shared memory usage of a program in Linux?

推荐答案

至少对于Valgrind 3.7.0,您可以使用以下选项来提供所需的信息:--pages-as-heap = no |是页面级别的配置文件内存[否]

At least with Valgrind 3.7.0, you have the below option which should give what you need: --pages-as-heap=no|yes profile memory at the page level [no]

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

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