On 11/28/2011 12:42 PM, Ehab Ababneh wrote:
Hello,
I have looked at Memcheck and found out that it detects memory leaks
*after* finishing executing the guest application (i.e.no
<http://i.e.no/> memory leak is detected as soon the last reference to
the allocated memory chunk is out of scope). Is that right or did I
miss something?
Thanks.
That is correct. Memcheck is not a garbage collection system and does
not count memory references dynamically. That would slow down your
program even more. There are many ways in which references to memory
can be "lost", such as storing a new value in a pointer variable, and
without reference counts every one of these ways would trigger a full
memory scan. In many applications, most memory is not released when
execution exits some scope; instead it is passed from module to module.
Thus there would not be much advantage to a scan every time you return
from a function, restart a loop iteration, etc.
--
David Chapman [email protected]
Chapman Consulting -- San Jose, CA
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users