John Shilkaitis wrote: > On Fri, Oct 24, 2008 at 4:58 PM, Darryl Miles > Is it possible to make valgrind dump out the locations of the "Still > Reachable" pointers to still allocated memory at program exit ? > > > Add --show-reachable=yes to your command line options.
Sorry I was not clear. I am aware of the --show-reachable=yes. This shows me that there are reachable allocated blocks: * It shows me the backtrace of the call to the allocator. * It provides me the size of the allocation. * It provides me with the number of similar still reachable allocations (based on similar backtrace and allocations size - i guess) But it doesn't show me: * Where in memory they are reachable from (the address of one of more pointers, pointing to/into the block). This is the magic thing that makes them "Still Reachable" as opposed to "Lost". * The address of each block itself (this data appears collapsed by the reporting of the number of similar allocations). It is my understanding that at program exit valgrind computes all the blocks of memory still allocated. Then it combs the memory for aligned locations that have a pointer to the start of (or into) the block. If it finds one or more pointers it marks the blocks as "Still Reachable". So there are 2 pieces of useful information missing from the outputed data: * The memory location of each pointer that points to a block. * The address of each block. (Which would allow me to think of the of adding my own debugging for that specific invocation return that address). Darryl ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users