栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 面试问答

在gdb中检查C / C ++堆内存统计信息

面试问答 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

在gdb中检查C / C ++堆内存统计信息

@fd- RedHat错误有您的答案。

mallinfo
功能已被弃用,不会被更新。真正的查询统计API是TDB。今天,您有
malloc_stats
malloc_info
。我找不到任何一个文档,但这是它们给您的。

这足够接近您的需求吗?

(gdb) call malloc_stats()Arena 0:system bytes     =     135168in use bytes     =         96Total (incl. mmap):system bytes     =     135168in use bytes     =         96max mmap regions =          0max mmap bytes   =          0(gdb) call malloc_info(0, stdout)<malloc version="1"><heap nr="0"><sizes><unsorted from="1228788" to="1229476" total="3917678" count="3221220448"/></sizes><total type="fast" count="0" size="0"/><total type="rest" count="3221220448" size="3917678"/><system type="current" size="135168"/><system type="max" size="135168"/><aspace type="total" size="135168"/><aspace type="mprotect" size="135168"/></heap><total type="fast" count="0" size="0"/><total type="rest" count="3221220448" size="3917678"/><system type="current" size="135168/><system type="max" size="135168/><aspace type="total" size="135168"/><aspace type="mprotect" size="135168"/></malloc>


转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/393027.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号