18 Apr 2011 01:44:45 UTC
- Distribution: Devel-MemoryTrace-Light
- Module version: 0.04
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (0)
- Testers (33 / 0 / 0)
- KwaliteeBus factor: 1
- License: perl_5
- Activity24 month
- Download (9.76KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version
- RUN-TIME CONTROL OF TRACING
- OS SUPPORT
- COPYRIGHT AND LICENSE
Devel::MemoryTrace::Light - Print a message when your program grows in memory
perl -d:MemoryTrace::Light Program
This is an Alpha release! More features to come.
Prints out a message when your program grows in memory containing the package, file, line, and number of bytes (resident set size) your program increased. For example, if your program looked like this:
#!/usr/bin/perl use strict; use warnings; my @arr; $arr = 'hello';
Then the output will look like:
>> init, 0 (0) used 8192 bytes >> main, ex.pl (7) used 20480 bytes
If you would like to override the default behavior of printing to STDOUT whenever the program size increases, you may provide your own callback method.
\&somefuncto be called whenever the debugger detects an increase in memory size.
\&somefuncshould accept 4 arguments:
Restores the default callback.
Currently works on FreeBSD, Linux, and anywhere else GTop is supported.
Please report any bugs (or feature requests) through http://rt.cpan.org/.
Matthew Horsfall (alh) - <WolfSage@cpan.org>
This software is copyright (c) 2011 by Matthew Horsfall.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Module Install Instructions
To install Devel::MemoryTrace::Light, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Devel::MemoryTrace::Light
For more information on module installation, please visit the detailed CPAN module installation guide.