Main > Programming > Libraries >

Devel::Monitor 0.9.0.7

Devel::Monitor 0.9.0.7

Sponsored Links

Devel::Monitor 0.9.0.7 Ranking & Summary

RankingClick at the star to rank
Ranking Level
User Review: 0 (0 times)
File size: 0.016 MB
Platform: Any Platform
License: Perl Artistic License
Price:
Downloads: 848
Date added: 2007-06-28
Publisher: Philippe Cote

Devel::Monitor 0.9.0.7 description

Devel::Monitor is a Perl module that can monitor your variables/objects for memory leaks.

You have memory leaks, and you want to remove it... You can use this tool to help you find which variables/objects that are not destroyed when they should be, and thereafter, you can visualise exactly where is the circular reference for some specific variables/objects.

WHAT IT CANT DO

Even if your modules are memory leak free, it doesnt mean that external modules that you are using dont have it. So, before running your application on mod_perl, you should be sure that EVERY modules are ok. (In particular those perl extensions calling C++ code)

SYNOPSIS

use Devel::Monitor qw(:all);

#-----------------------------------------------------------------------------
# Monitor scalars, arrays, hashes, references, constants
#-----------------------------------------------------------------------------
my ($a,$b) = (Foo::Bar->new(), Foo::Bar->new());
my ($c, @d, %e);
use constant F => [1,2];
monitor(name for a => $a,
name for b => $b,
name for c => $c,
name for d => @d,
name for e => %e,
name for F => &F); #NOTE : Dont add parentheses to the end of the constant (&F())

#-----------------------------------------------------------------------------
# Print circular references
#-----------------------------------------------------------------------------
# NOTE : You cannot use print_circular_ref on a monitored/tied variable
# (See "We cannot use tied objects references because it reuse memory space" doc)
print_circular_ref($a);
print_circular_ref($b);
print_circular_ref($c);
print_circular_ref(@d);
print_circular_ref(%e);
print_circular_ref(&F); #NOTE : Dont add parentheses to the end of the constant (&F())

USAGE : monitor

Example with a circular reference
+----------------------+
| Code |
+----------------------+
{
my @a;
monitor(a => @a);
$a[0] = @a; #Add a circular reference
print STDERR "Leaving scopen";
}
print STDERR "Scope leftn";

+----------------------+
| Output |
+----------------------+
MONITOR ARRAY a
Leaving scope
Scope left
DESTROY ARRAY a

+----------------------+
| Meaning |
+----------------------+
The line "DESTROY ARRAY a" should be between scope prints.
@a were deleted on program exit.

Example without a circular reference

+----------------------+
| Code |
+----------------------+
{
my @a;
monitor(a => @a);
print STDERR "Leaving scopen";
}
print STDERR "Scope leftn";

+----------------------+
| Output |
+----------------------+
MONITOR ARRAY a
Leaving scope
DESTROY ARRAY a
Scope left

+----------------------+
| Meaning |
+----------------------+
Everything is ok

Now that you know there is a circular reference, you can track it down using the print_circular_ref method

Devel::Monitor 0.9.0.7 Screenshot

Advertisements

Devel::Monitor 0.9.0.7 Keywords

Bookmark Devel::Monitor 0.9.0.7

Hyperlink code:
Link for forum:

Devel::Monitor 0.9.0.7 Copyright

WareSeeker periodically updates pricing and software information of Devel::Monitor 0.9.0.7 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Devel::Monitor 0.9.0.7 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed

Allok Video Splitter 2.2.0 Review:

Name (Required)
Email(Required)
Captcha
Featured Software

Want to place your software product here?
Please contact us for consideration.

Contact WareSeeker.com
Related Software
Devel::STrace::Monitor is a monitor interface component for Devel::STrace. Free Download
Devel::Carnivore is a Perl module to spy on your hashes (and objects). Free Download
Devel::Pointer is a Perl module that can fiddle around with pointers. Free Download
Devel::Messenger is a Perl module who let your code talk to you. Free Download
Devel::TraceLoad is a Perl module to trace loadings of Perl Programs. Free Download
Devel::Tokenizer::C is a Perl module that can generate C source for fast keyword tokenizer. Free Download
Devel::Hints is a Perl module created to access compile-time hints at runtime. Free Download
Devel::Graph module can turn Perl code into a graphical flowchart. Free Download