Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Carl Worth <cworth <at> cworth.org>
Subject: A handy script for generating a talloc report for a running process
Newsgroups: gmane.network.samba.internals
Date: Wednesday 26th January 2011 07:16:40 UTC (over 5 years ago)
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
 
CD: 4ms