简体   繁体   中英

C++: get heap memory information

I would like to know if with c++ it is possible to get information about heap memory, like some information of all arenas, some information of fastbin, smallbin and so on

Not in general. The C++ programming language does not have a formal concept of a 'heap', only of dynamic object lifetimes. A given implementation of the C++ standard library will likely have debug facilities for getting information about its allocator, and your OS will have facilities for getting information about process allocations, but these are all specific to your environment, and not part of the language standard.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM