Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • BackTrack 5 R2
  • Wine 1.4 / 1.5.5
  • Mozilla Firefox 12...
  • Ubuntu 11.04
  • Angry Birds 1.1.2.1
  • Ubuntu 10.04.4 LTS
  • Linux Kernel 3.4
  • Ubuntu Manual 10.10
  • Adobe Flash Player...
  • Pidgin 2.10.4
  • Home > Linux > Programming > Perl Modules

    Devel::Plumber 0.3.4

    Download button

    No screenshots available
    Downloads: 70  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Greg Banks | More programs
    Perl Artistic License / FREE
    February 5th, 2012, 22:12 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Devel::Plumber description

    Memory leak finder for C programs

    Devel::Plumber is a memory leak finder class for C programs, implemented in Perl. It uses GDB to walk internal glibc heap structures, so it can work on either a live process or a core file.

    Devel::Plumber treats the C heap of the program under test as a collection of non-overlapping blocks, and classifies them into one of four states.

    Free

     The block is not allocated.

    Leaked

     The block is allocated but there are no pointers to any address in it, so the program cannot reach it.

    Maybe Leaked

     The block is allocated and there are pointers to addresses within it, but no pointers to the start of it. The program might be able to reach it in some unobvious way via those pointers (e.g. using pointer arithmetic), or the pointers may be dangling pointers to earlier generations of blocks. Devel::Plumber cannot tell the difference between these possibilities.

    Reached

     The block is allocated and there are pointers to the start of the block.

    Devel::Plumber proceeds in two main phases. In the first phase, the glibc internal heap structures are walked to discover all the blocks. Unallocated blocks are set to Free state at this time and allocated blocks are initially set to Leaked state. In the second phase, reachable blocks are marked. All the .data and .bss sections in the program (and all loaded shared libraries) are scanned for pointers. If a pointer points to the start of a block, the block is set to Reached state; if it points into a Leaked block, the block is set to Maybe Leaked state. In either case, the block's contents are also scanned for pointers. After the second phase is complete, any blocks still in Leaked state are definitely leaked.

    SYNOPSIS

     use Devel::Plumber;
     
     my $mario = new Devel::Plumber(binfile => 'myprogram',
     pid => 12345);
     
     $mario = new Devel::Plumber(binfile => 'myprogram',
     corefile => 'core.12345');
     
     $mario->find_leaks();
     $mario->report_leaks();



    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    memory leak | leak finder | Perl module | Perl | memory | leak



    HTML code for linking to this page:


    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM