Carl Worth | 26 Jan 08:16 2011

A handy script for generating a talloc report for a running process

I was lucky enough to sit next to Andrew at dinner last night and he
gave me some tips on using talloc's reporting facilities for debugging
memory leaks.

One of the tips he had was using a script that uses a gdb script to
generate a talloc report for a current process.

I've included below the script that he helped me write. I think it would
make sense to bundle something like this with talloc itself. Some notes:

1. I've attached a copyright message for Andrew since at most I just
   copied from a file he wrote originally. I also attached the standard
   license blurb from talloc. Andrew, let me know if any of that should

2. It would be preferable for the script to generate output on stdout
   rather than printing to a file in /tmp/ and forcing a leak of a file
   descriptor. If someone could improve that, that would be great.

I hope this is useful,


Attachment ( text/x-sh, 1378 bytes