@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>



