-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, Feb 27, 2002 at 03:06:40PM -0700, Ken Miller wrote:
> Is there a way to track down where the leaks are occurring without placing
> debugging messages everywhere?  77 SVs isn't a lot, but when this many SVs
> are leaked per iteration, and you've got about a million rows to rip
> through, it adds up to a *lot*.

I find Devel::Leak to be very useful in this regard, as it will actually do a 
Perl_sv_dump() on the orphaned SVs.  From there you can generally track down 
where it's coming from, particularly if you put a signal flare in the structure 
you think is escaping deallocation, say:

        $struct->{foo} = 'YOU HAVE A LEAK';

When the string reemerges in the Devel::Leak output, the problem becomes pretty 
apparent :)

- -- 
Stephen Clouse <[EMAIL PROTECTED]>
Senior Programmer, IQ Coordinator Project Lead
The IQ Group, Inc. <http://www.theiqgroup.com/>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAjx9cbsACgkQA4aoazQ9p2d0wwCgh5yv4I6RTEwYW8jgmaDm2UWC
MdEAoN+gadssDYLxZQuVbtTUgjW4kvVK
=DxRC
-----END PGP SIGNATURE-----

Reply via email to