|
From: Bryan M. <om...@br...> - 2006-06-24 21:23:21
|
see http://www.brainmurders.eclipse.co.uk/omega.html for a complete overview of what this tool can do for you! We use this at work - feel free to give it a spin... >From the web page: ----------------------------------- Omega addresses what I perceive to be one of the few shortfalls of the excellent Valgrind Memcheck Tool - where Memcheck reports the location that a leaked block was allocated, Omega also shows where it was leaked. New in Beta3: Omega now detects circular references: typedef struct { void *linkedBlock; char padding[120]; } block; block *p1 = NULL; block *p2 = NULL; p1 = (block *)malloc(sizeof(block)); p2 = (block *)malloc(sizeof(block)); p1->linkedBlock = p2; p2->linkedBlock = p1; As you can see, the blocks wont be seen to leak because they have a valid live reference but the reality is that without an external reference, these blocks are lost to the system. Before exiting, Omega now scans any remaining blocks to check that they have an external reference, no matter how far back down the chain it is. I am still toying with the idea of allowing targeted tracking through the use of the suppression system (set a suppression rule to exclusively report on a specified malloc() call and no others but with extra debug output for instance). If you use Omega and think it would be useful, please let me know. As ever, I would welcome your comments, bug reports and any news of success stories. Bryan "Brain Murders" Meredith |