|
From: Dennis L. <pla...@in...> - 2005-08-26 09:56:36
|
Am Freitag, den 26.08.2005, 08:55 +0100 schrieb Tom Hughes: > In message <6.1.2.0.0.20050826094230.02b81878@192.168.5.6> > Dennis Lubert <pla...@in...> wrote: > > > Btw, to all others in the list, can I somehow print the address of the > > memory still reachable/leaked ? It would help to track it down when > > writing memory addresses of various internal stuff.. > > No, because valgrind doesn't remember that when it is searching for > leaks because it wants to aggregate leaks together - each leak report > may correspond to a number of blocks so there is no one block whose > address could be printed. Ok, sounds reasonable. But wasnt there a way to print every single lost block, like with something leak-check=full ? So would it perhaps be possible to implement it there ? I think it would be a nice feature to identify some hard to track-down memory leaks. Sometimes there are lots of objects created, which cause the same stack trac, but their point of destruction is sometimes here, sometimes there, and sometimes you miss one of them to destroy. So I think it could be helpful to be able to print the address of the objects as they traverse some internals, and at the end look which of those objects it was, that was leaked. I think this could help to track down the leaks... Just if its easy to implement, otherwise there is still the way to printf in destructor and look which object was not destroyed, although not so easy and straightforward than it could be ;) greets Dennis |