在编译时检测C中的内存泄漏 [英] Detecting Memory leaks in C at compile time

查看:88
本文介绍了在编译时检测C中的内存泄漏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好
我有一个问题,几天后我正在寻找该问题的答案.我的问题是

在编译时检测C中的内存泄漏,有可能吗?

我们有什么工具可以在编译时自动修复内存泄漏吗?


谢谢
BipinC

Hi guys
I have one question and i am searching answer for that question from few days. My question is

Detecting memory leak in C at compile time, is it possible?

Do we have any tool that can fix memory leaks automatically at compile time?


Thanks
BipinC

推荐答案

写道:​​

我们有没有什么工具可以修复内存泄漏自动在编译时?

Do we have any tool that can fix memory leaks automatically at compile time?



不,您需要自己修复.




No, you need to fix them yourself.


写道:​​

在编译时检测C中的内存泄漏,有可能吗?

Detecting memory leak in C at compile time, is it possible?



您可以购买一些工具来尝试对其进行修复,但是它们可以在运行时运行.编译时工具将是一项壮举,它必须在编译时跟踪所有可能的操作路径.



There are tools you can buy that attempt to fix them, but they work at run time. A compile time tool would be quite a feat, it would have to track all the possible paths of operation as it compiles.


写道:

在编译时检测C中的内存泄漏,有可能吗?

Detecting memory leak in C at compile time, is it possible?


可以检测到其中的一些(通过代码检查您可能会稍加注意就可以检测到它们;换句话说,很容易...).
:)


It is possible to detect some of them (the ones you probably could detect with a bit of attention by code inspection; in other words, the easy ones...).
:)


这篇关于在编译时检测C中的内存泄漏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆