C Valgrind内存泄漏报告中的时间戳不正确

C Valgrind内存泄漏报告中的时间戳不正确,c,memory-management,memory-leaks,valgrind,C,Memory Management,Memory Leaks,Valgrind,我在一个很大的代码库上运行Valgrind,代码库“--time stamp=yes” 我需要找出每个内存分配的实际(相对)时间戳 问题:Valgrind报告包含生成泄漏摘要的时间戳 Steps: - Run the codebase for 24 Hours with valgrind [ options "--tool=memcheck --leak-check=full --time-stamp=yes"] - Terminate the process with "kil

我在一个很大的代码库上运行Valgrind,代码库
“--time stamp=yes”

我需要找出每个内存分配的实际(相对)时间戳

问题:Valgrind报告包含生成泄漏摘要的时间戳

Steps:

 - Run the codebase for 24 Hours with valgrind [ options
   "--tool=memcheck --leak-check=full --time-stamp=yes"]


 - Terminate the process with "kill -15" after 24 hours, Leak Summary is
   generated.


 - Time-Stamps In Valgrind Report= Time of Leak Report Generation [Not
   the Actual Time at which Memory was Allocated]
是否有任何选项可以让我获得实际的时间戳——泄漏内存的分配时间


谢谢

不,没有,因为泄漏不会被实时检测到-实际上没有任何方法可以做到这一点。相反,它们是在程序完成时通过扫描内存来检测的,以查看哪些块仍然可以访问-任何已分配但无法访问的都是泄漏。

谢谢,但是valgrind不能至少为内存分配提供正确的时间戳吗?只要在结束时生成泄漏报告?是,原则上,它可以记录分配时间,但目前不这样做。但泄漏报告是聚合的-每个报告都引用在给定位置分配的所有块,因此不会有一次。