As a start for a `normal' interface to the interperters internals, this time no open hack, but a neat interface.
Very open to additions.
Useful?
Feedback please
NAME
Devel-Internals - Perl extension for internal interpreter statistics
SYNOPSIS
use Devel::Internals;
my $end = sbrk ();
my @array = (1..10000);
print "The creation of this array used ",
sbrk () - $end, "bytes\n";
# Easier
use Devel::Internals;
my @array = (1..10000);
MemUsed "creation of array";
my @dup = @array;
MemUsed "duplication of array";
DESCRIPTION
sbrk
returns the current memory top. See sbrk(2) manual page
MemUsed ($msg)
Used in void context reports the number of bytes used since the
previous call to MemUsed with the message passed
Used in scalar context returns the current sbrk value
Used in list context returns the values saved on every call
AUTHOR
H.Merijn Brand <[EMAIL PROTECTED]>
COPYRIGHT AND LICENSE
Copyright (C) 1996-2002 H.Merijn Brand for PROCURA B.V.
This library is free software; you can use it under the same terms as
Perl itself
SEE ALSO
sbrk(2)
--
H.Merijn Brand Amsterdam Perl Mongers (http://amsterdam.pm.org/)
using perl-5.6.1, 5.8.0 & 633 on HP-UX 10.20 & 11.00, AIX 4.2, AIX 4.3,
WinNT 4, Win2K pro & WinCE 2.11. Smoking perl CORE: [EMAIL PROTECTED]
http:[EMAIL PROTECTED]/ [EMAIL PROTECTED]
send smoke reports to: [EMAIL PROTECTED], QA: http://qa.perl.org
Devel-Internals-0.01.tgz
Description: Binary data
