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.
我在我的main.cpp文件中包含一个巨大的模板库,我想对生成的程序进行堆分析。我正在使用massif它来ms_print进行可视化。用-pg.
main.cpp
massif
ms_print
-pg
在详细快照表中,我想查看代码的哪些部分分配的内存最多。问题是表中的信息总是只指main,没有行号,有时甚至是“???”。
main
我意识到所有模板都包含在 中main.cpp,即 main 实际上是从一个巨大的源文件编译而来的,没有机会区分.tcc调用来自哪个文件的哪一行。
.tcc
是否有解决此问题的方法或更好的方法?
谢谢。