Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Track memory allocation

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 dist
Octocat-spinner-32 ex
Octocat-spinner-32 lib
Octocat-spinner-32 t
Octocat-spinner-32 xt
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Changes
Octocat-spinner-32 LICENSE
Octocat-spinner-32 MANIFEST
Octocat-spinner-32 MANIFEST.SKIP
Octocat-spinner-32 META.yml
Octocat-spinner-32 Makefile.PL
Octocat-spinner-32 README
Octocat-spinner-32 makeall.sh
README
NAME
    Dash::Leak - Track memory allocation

SYNOPSIS
    Quick summary of what the module does.

        use Dash::Leak;
    
        {
            leaksz "block label";
            # some code, that may leak
        }
        # If your code leaked, you'll be noticed about change
        # of process vsize after leaving block
    
        leaksz "tests begin";
        some_operation($arg);
        leaksz "some_operation", sub {
            warn sprintf "We leaked after some_operation($arg) by %+d kilobytes;", shift
        };
        another_operation();
        leaksz "another_operation";
        # ...

        use Dash::Leak sub { ... }; # Will call this cb for every alloc, instead of warn

EXPORT
    Export of this module is "virtual", by using Devel::Declare. When
    $ENV{DEBUG_MEM} is true, it will work, when false, this opcodes will be
    ignored, like with "leaksz ... if 0";

FUNCTIONS
  leaksz $label, [$cb->($delta)]
    Starts tracking current block. If something changed since last note,
    notice will be warned. If callback is passed, it will be invoked instead
    of warn.

ACKNOWLEDGEMENTS
    *   Thanks to knevgen (<http://github.com/knevgen>) for linux version
        patch

AUTHOR
    Mons Anderson, "<mons at cpan.org>"

COPYRIGHT & LICENSE
    Copyright 2010 Mons Anderson, all rights reserved.

    This program is free software; you can redistribute it and/or modify it
    under the same terms as Perl itself.

Something went wrong with that request. Please try again.