A handy script for generating a talloc report for a running process
Carl Worth
cworth at cworth.org
Wed Jan 26 00:16:40 MST 2011
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
change.
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,
-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20110126/965b9b2a/attachment.pgp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: talloc-report.sh
Type: text/x-sh
Size: 1378 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20110126/965b9b2a/attachment.sh>
More information about the samba-technical
mailing list