יובל קוג'מן (Yuval Kogman) > Devel-Gladiator-0.01 > Devel::Gladiator

Download:
Devel-Gladiator-0.01.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  2
Open  0
View/Report Bugs
Module Version: 0.01   Source   Latest Release: Devel-Gladiator-0.07

NAME ^

Devel::Gladiator - Walk Perl's arena

SYNOPSIS ^

        use Devel::Gladiator qw(walk_arena arena_ref_counts arena_table);

    my $all = walk_arena();

        foreach my $sv ( @$all ) {
                warn "live object: $sv\n";
        }

        warn arena_table(); # prints counts keyed by class

DESCRIPTION ^

Devel::Gladiator iterate's Perl's internal memory structures and can be used to enumerate all the currently live SVs.

This can be used to hunt leaks and to profile memory usage.

EXPORTS ^

walk_arena

Returns an array reference containing all the live SVs.

arena_ref_counts

Returns a hash keyed by class and reftype of all the live SVs.

This is a convenient way to find out how many objects of a given class exist at a certain point.

arena_table

Formats a string table based on arena_ref_counts suitable for printing.

COPYRIGHT AND LICENCE ^

Put the correct copyright and licence information here.

Copyright (C) 2006 by Artur Bergman

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.

syntax highlighting: