|
From: Stefan K. <en...@ho...> - 2007-09-07 18:10:29
|
hi,
while its nice that memcheck give you the backtrace where memeory was allocated
that is leaked, its sometimes quite hard to figure where it is leaked.
Especially if a referecne to the area is passed around.
Is there a tool or could there be a tool that
a) could know when the last reference is lost
b) could tell you where in the code one had a reference for that lost block
with a) I mean, suppose I have
struct data {
int a;
void *ptr;
};
in the code I have instances of struct data. When a struct data instance is
free'ed, it's reference to ptr also goes away. I know that this would not be
dead-proof (might be hard to track everything when people do pointer math).
thanks for listening, keep rocking!
Stefan
|
|
From: Olly B. <ol...@su...> - 2007-09-07 18:19:54
|
On 2007-09-07, Stefan Kost <en...@ho...> wrote: > Is there a tool or could there be a tool that > a) could know when the last reference is lost > b) could tell you where in the code one had a reference for that lost block http://www.brainmurders.demon.co.uk/omega.html Cheers, Olly |