Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

The following leaks:

#!./localperl/bin/perl # use strict; use warnings; use Devel::Leak; my $handle; my $count = Devel::Leak::NoteSV($handle); my $countdown = 10; while($countdown--) { my $bar; $bar = \$bar; } Devel::Leak::CheckSV($handle); print "End $count\n";

It produces:

new 0xa0ff678 : SV = IV(0xa0ff674) at 0xa0ff678 REFCNT = 1 FLAGS = (PADMY,ROK) RV = 0xa0ff678 SV = IV(0xa0ff674) at 0xa0ff678 REFCNT = 1 FLAGS = (PADMY,ROK) RV = 0xa0ff678 SV = IV(0xa0ff674) at 0xa0ff678 REFCNT = 1 FLAGS = (PADMY,ROK) RV = 0xa0ff678 SV = IV(0xa0ff674) at 0xa0ff678 REFCNT = 1 FLAGS = (PADMY,ROK) RV = 0xa0ff678 SV = IV(0xa0ff674) at 0xa0ff678 REFCNT = 1 FLAGS = (PADMY,ROK) RV = 0xa0ff678 new 0xa0ff688 : SV = IV(0xa0ff684) at 0xa0ff688 REFCNT = 1 FLAGS = (PADMY,ROK) RV = 0xa0ff688 SV = IV(0xa0ff684) at 0xa0ff688 REFCNT = 1 FLAGS = (PADMY,ROK) RV = 0xa0ff688 SV = IV(0xa0ff684) at 0xa0ff688 REFCNT = 1 FLAGS = (PADMY,ROK) RV = 0xa0ff688 SV = IV(0xa0ff684) at 0xa0ff688 REFCNT = 1 FLAGS = (PADMY,ROK) RV = 0xa0ff688 SV = IV(0xa0ff684) at 0xa0ff688 REFCNT = 1 FLAGS = (PADMY,ROK) RV = 0xa0ff688 new 0xa0fb9e8 : SV = NULL(0x0) at 0xa0fb9e8 REFCNT = 1 FLAGS = (PADSTALE,PADMY) new 0xa0fbbf8 : SV = IV(0xa0fbbf4) at 0xa0fbbf8 REFCNT = 1 FLAGS = (PADMY,ROK) RV = 0xa0fbbf8 SV = IV(0xa0fbbf4) at 0xa0fbbf8 REFCNT = 1 FLAGS = (PADMY,ROK) RV = 0xa0fbbf8 SV = IV(0xa0fbbf4) at 0xa0fbbf8 REFCNT = 1 FLAGS = (PADMY,ROK) RV = 0xa0fbbf8 SV = IV(0xa0fbbf4) at 0xa0fbbf8 REFCNT = 1 FLAGS = (PADMY,ROK) RV = 0xa0fbbf8 SV = IV(0xa0fbbf4) at 0xa0fbbf8 REFCNT = 1 FLAGS = (PADMY,ROK) RV = 0xa0fbbf8 new 0xa0ed730 : SV = IV(0xa0ed72c) at 0xa0ed730 REFCNT = 1 FLAGS = (PADMY,ROK) RV = 0xa0ed730 SV = IV(0xa0ed72c) at 0xa0ed730 REFCNT = 1 FLAGS = (PADMY,ROK) RV = 0xa0ed730 SV = IV(0xa0ed72c) at 0xa0ed730 REFCNT = 1 FLAGS = (PADMY,ROK) RV = 0xa0ed730 SV = IV(0xa0ed72c) at 0xa0ed730 REFCNT = 1 FLAGS = (PADMY,ROK) RV = 0xa0ed730 SV = IV(0xa0ed72c) at 0xa0ed730 REFCNT = 1 FLAGS = (PADMY,ROK) RV = 0xa0ed730 new 0xa0ed740 : SV = IV(0xa0ed73c) at 0xa0ed740 REFCNT = 1 FLAGS = (PADMY,ROK) RV = 0xa0ed740 SV = IV(0xa0ed73c) at 0xa0ed740 REFCNT = 1 FLAGS = (PADMY,ROK) RV = 0xa0ed740 SV = IV(0xa0ed73c) at 0xa0ed740 REFCNT = 1 FLAGS = (PADMY,ROK) RV = 0xa0ed740 SV = IV(0xa0ed73c) at 0xa0ed740 REFCNT = 1 FLAGS = (PADMY,ROK) RV = 0xa0ed740 SV = IV(0xa0ed73c) at 0xa0ed740 REFCNT = 1 FLAGS = (PADMY,ROK) RV = 0xa0ed740 new 0xa0edb70 : SV = IV(0xa0edb6c) at 0xa0edb70 REFCNT = 1 FLAGS = (PADMY,ROK) RV = 0xa0edb70 SV = IV(0xa0edb6c) at 0xa0edb70 REFCNT = 1 FLAGS = (PADMY,ROK) RV = 0xa0edb70 SV = IV(0xa0edb6c) at 0xa0edb70 REFCNT = 1 FLAGS = (PADMY,ROK) RV = 0xa0edb70 SV = IV(0xa0edb6c) at 0xa0edb70 REFCNT = 1 FLAGS = (PADMY,ROK) RV = 0xa0edb70 SV = IV(0xa0edb6c) at 0xa0edb70 REFCNT = 1 FLAGS = (PADMY,ROK) RV = 0xa0edb70 new 0xa0edb80 : SV = IV(0xa0edb7c) at 0xa0edb80 REFCNT = 1 FLAGS = (PADMY,ROK) RV = 0xa0edb80 SV = IV(0xa0edb7c) at 0xa0edb80 REFCNT = 1 FLAGS = (PADMY,ROK) RV = 0xa0edb80 SV = IV(0xa0edb7c) at 0xa0edb80 REFCNT = 1 FLAGS = (PADMY,ROK) RV = 0xa0edb80 SV = IV(0xa0edb7c) at 0xa0edb80 REFCNT = 1 FLAGS = (PADMY,ROK) RV = 0xa0edb80 SV = IV(0xa0edb7c) at 0xa0edb80 REFCNT = 1 FLAGS = (PADMY,ROK) RV = 0xa0edb80 new 0xa0dd1e0 : SV = IV(0xa0dd1dc) at 0xa0dd1e0 REFCNT = 1 FLAGS = (PADMY,ROK) RV = 0xa0dd1e0 SV = IV(0xa0dd1dc) at 0xa0dd1e0 REFCNT = 1 FLAGS = (PADMY,ROK) RV = 0xa0dd1e0 SV = IV(0xa0dd1dc) at 0xa0dd1e0 REFCNT = 1 FLAGS = (PADMY,ROK) RV = 0xa0dd1e0 SV = IV(0xa0dd1dc) at 0xa0dd1e0 REFCNT = 1 FLAGS = (PADMY,ROK) RV = 0xa0dd1e0 SV = IV(0xa0dd1dc) at 0xa0dd1e0 REFCNT = 1 FLAGS = (PADMY,ROK) RV = 0xa0dd1e0 new 0xa0dd310 : SV = IV(0xa0dd30c) at 0xa0dd310 REFCNT = 1 FLAGS = (PADMY,ROK) RV = 0xa0dd310 SV = IV(0xa0dd30c) at 0xa0dd310 REFCNT = 1 FLAGS = (PADMY,ROK) RV = 0xa0dd310 SV = IV(0xa0dd30c) at 0xa0dd310 REFCNT = 1 FLAGS = (PADMY,ROK) RV = 0xa0dd310 SV = IV(0xa0dd30c) at 0xa0dd310 REFCNT = 1 FLAGS = (PADMY,ROK) RV = 0xa0dd310 SV = IV(0xa0dd30c) at 0xa0dd310 REFCNT = 1 FLAGS = (PADMY,ROK) RV = 0xa0dd310 End 2650

I was running this against the following:

Summary of my perl5 (revision 5 version 11 subversion 0) configuration +: Commit id: Platform: osname=linux, osvers=2.6.18-92.el5, archname=i686-linux uname='linux alula.local 2.6.18-92.el5 #1 smp tue jun 10 18:49:47 +edt 2008 i686 i686 i386 gnulinux ' config_args='-DDEBUGGING' hint=previous, useposix=true, d_sigaction=define useithreads=undef, usemultiplicity=undef useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=und +ef use64bitint=undef, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-DDEBUGGING -fno-strict-aliasing -pipe -fstack- +protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BIT +S=64', optimize='-g', cppflags='-DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector + -I/usr/local/include -DDEBUGGING -fno-strict-aliasing -pipe -fstack- +protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BIT +S=64 -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -I/usr/ +local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64' ccversion='', gccversion='4.1.2 20071124 (Red Hat 4.1.2-42)', gcco +sandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=1 +2 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', + lseeksize=8 alignbytes=4, prototype=define Linker and Libraries: ld='cc', ldflags =' -fstack-protector -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc libc=/lib/libc-2.5.so, so=so, useshrplib=false, libperl=libperl.a gnulibc_version='2.5' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E' cccdlflags='-fPIC', lddlflags='-shared -g -L/usr/local/lib -fstack +-protector' Characteristics of this binary (from libperl): Compile-time options: DEBUGGING PERL_DONT_CREATE_GVSV PERL_MALLOC_WR +AP USE_LARGE_FILES USE_PERLIO Built under linux Compiled at Mar 29 2009 08:05:39 %ENV: PERLDOC_PAGER="less" @INC: /home/ian/localperl/lib/site_perl/5.11.0/i686-linux /home/ian/localperl/lib/site_perl/5.11.0 /home/ian/localperl/lib/5.11.0/i686-linux /home/ian/localperl/lib/5.11.0 .

And I installed Devel::Leak using this perl (actually the corresponding cpan).


In reply to Re: Tracking down memory leaks in Perl Devel::Leak by ig
in thread Tracking down memory leaks in Perl Devel::Leak by brycen

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-19 23:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found