gpt4 book ai didi

c++ - 什么是 "allocation context"?

转载 作者:可可西里 更新时间:2023-11-01 16:35:28 26 4
gpt4 key购买 nike

我是一名学生,我必须进行有关内存泄漏检测的研究。在许多论文中,他们都在谈论分配背景。我不知道这是什么意思。我找不到任何allocation context 的定义(或翻译,我来自德国)。

举个例子,引用一篇论文(Detecting Memory Leaks through Introspective Dynamic使用机器学习的行为建模):

The key idea behind using machine learning is that a leaking object is discernible by observing the lifetimes of other similar objects. That is, an object can be regarded as having leaked when it accrues a high degree of staleness that is not observed from other supposedly similar objects, i.e., objects with the same allocation context.

或者:

To work around this, this work takes inspiration from previous research on object lifetime prediction [4, 20]. According to these works, the lifetime of an object is strongly correlated with its allocation context. Since the staleness of an object is bounded by its lifetime, object staleness is transitively correlated with allocation context.

谁能尽可能简单地向我解释一下?

编辑:

摘要:

This paper expands staleness-based memory leak detection by presenting a machine learning-based framework. The proposed framework is based on an idea that object stal- eness can be better leveraged in regard to similarity of ob- jects; i.e., an object is more likely to have leaked if it shows signicantly high staleness not observed from other similar objects with the same allocation context. A central part of the proposed framework is the modeling of heap objects. To this end, the framework observes the staleness of objects during a representative run of an ap- plication. From the observed data, the framework generates training examples, which also contain instances of hypothet- ical leaks. Via machine learning, the proposed framework replaces the error-prone user-denable staleness predicates used in previous research with a model-based prediction. The framework was tested using both synthetic and real- world examples. Evaluation with synthetic leakage work- loads of SPEC2006 benchmarks shows that the proposed method achieves the optimal accuracy permitted by staleness- based leak detection. Moreover, by incorporating allocation context into the model, the proposed method achieves higher accuracy than is possible with object staleness alone. Evaluation with real-world memory leaks demonstrates that the proposed method is eective for detecting previously re- ported bugs with high accuracy.

最佳答案

我收到了一位作者的回复。定义如下:

分配上下文

It refers to the call stack contents at the time of an allocation. For example, if an allocation site is contained in function foo and the function is called from main (during the execution), the allocation context for the allocation site is (main, main: call@foo, foo: malloc(...)).

关于c++ - 什么是 "allocation context"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30551402/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com