Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个程序。当它正常运行时,我的硬编码峰值内存检查器报告 1G。当它与地块一起运行时,我的检查器报告 2.2G ......
我的峰值内存检查器不是智能检查器,我只在硬编码的地方调用它来获取当前的内存足迹。我想知道地块是否会导致程序使用更多内存。
Massif(与其他 valgrind 工具一样)正在使用一些内存来实现自己的功能。因此,如果您的内存报告是检查总 mmap-ed 大小或类似的,那将包括地块(和 valgrind 核心)开销。如果您使用 malloc 库报告信息(例如 mallinfo 或类似的),那么这些数字应该相当接近原生运行。