简体   繁体   English

Valgrind时间限制

[英]Valgrind time limit

I have an embedded system that runs indefinitely, and need to check it for memory leaks. 我有一个无限期运行的嵌入式系统,需要检查它是否存在内存泄漏。 In a terminal it's easy enough to just kill the process, however, I need to set this up as an automatic thing on a Jenkins build server. 在终端中,终止该过程很容易,但是,我需要在Jenkins构建服务器上将其设置为自动操作。 I have been unable to find a time limit option myself, so does anyone else know of a way for me to do this? 我自己无法找到时间限制选项,那么还有其他人知道我可以这样做的方法吗?

I am using the Jenkins Valgrind Plugin found here: 我正在使用在这里找到的Jenkins Valgrind插件:
https://wiki.jenkins-ci.org/display/JENKINS/Valgrind+Plugin https://wiki.jenkins-ci.org/display/JENKINS/Valgrind+Plugin

After pouring through the valgrind manual, there is no built-in time limit option. 仔细阅读valgrind手册后,没有内置的时限选项。 However, if you want to do something like this, you can use --trace-children and build a wrapper/helper program that will fork the target program and then kill the fork after the time limit. 但是,如果您想执行此类操作,则可以使用--trace-children并构建一个包装程序/帮助程序,该程序将分叉目标程序,然后在时间限制后终止该分叉。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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