Devel-Mallinfo
view release on metacpan or search on metacpan
devel/hblk.c
devel/info-string.pl
devel/Makefile
devel/mallopt.c
devel/mallstats.c
devel/malltrim.c
devel/mstat.pl
devel/old-run.pl
devel/run.pl
devel/taint.pl
devel/weaken.pl
examples/mallinfo.pl
examples/malloc-info-string.pl
examples/malloc-info.pl
examples/malloc-stats.pl
inc/my_pod2html
lib/Devel/Mallinfo.pm
Makefile.PL
Mallinfo.xs
MANIFEST This list of files
MANIFEST.SKIP
t/import.t
t/load.t
t/malloc-info-string-taint.t
t/malloc-info-string.t
t/malloc-info.t
t/malloc-stats.t
t/malloc-trim.t
t/MyTestHelpers.pm
t/MyWithoutGNU.pm
t/noimport.t
t/test-weaken.t
xt/0-examples-xrefs.t
xt/0-file-is-part-of.t
xt/0-META-read.t
xt/0-no-debug-left-on.t
xt/0-Test-ConsistentVersion.t
xt/0-Test-DistManifest.t
xt/0-Test-Pod.t
xt/0-Test-Synopsis.t
xt/0-Test-YAML-Meta.t
xtools/my-check-copyright-years.sh
SHA1 dd126f863a472a3a01192d784230588ab315a86b devel/Makefile
SHA1 428b3208a020d7fe9d32acf76f3589bac91f918f devel/hblk.c
SHA1 8d3eb951d4a4cef842c4458c6c457d93306cf26a devel/info-string.pl
SHA1 79f25112cfb5443732ad883a512efe597fbb527b devel/mallopt.c
SHA1 32dd3c7de251cc15ff60caa65c35222f55c6c588 devel/mallstats.c
SHA1 e62bcf57ac86188201a29c2aca41472ee475995e devel/malltrim.c
SHA1 853637c0483504bdec15b82b0a86a5601caace61 devel/mstat.pl
SHA1 e58b5365024e024868abce6f02e99c97db9dbad6 devel/old-run.pl
SHA1 86777a577ca0c73cb112053ee9af9be5a93a4bef devel/run.pl
SHA1 7e73d237ac8b15150ad5bc269c39c6742f9056aa devel/taint.pl
SHA1 be42b32283a2d9890151aa08079c0557898848ff devel/weaken.pl
SHA1 2c7a12ac0c0c4395856cf80b7b3b3bded065578e examples/mallinfo.pl
SHA1 1d4b7fe1b44cacb30cb1911cff9857aaef0314c7 examples/malloc-info-string.pl
SHA1 8e1c998d790ffd29f1c011eaaa512e3235a13172 examples/malloc-info.pl
SHA1 68570681efee34021bb4745fd7df3591a9077f73 examples/malloc-stats.pl
SHA1 2c31f38013695c85f0a75eb2c783989978aa298b inc/my_pod2html
SHA1 199b42f4ecbb47bed321625a04f414c1385a684c lib/Devel/Mallinfo.pm
SHA1 e2965242503050c505bb13de53735a4f2cc8b06a ppport.h
SHA1 3855de075da37f5bc4e6a5534b2f00cc14872a98 t/MyTestHelpers.pm
SHA1 1d0f7cbad139fd3fa09c100e01c705facf7c8756 t/MyWithoutGNU.pm
SHA1 6babad57c36d572701fa35341ba5b64c8ef3cc69 t/import-all.t
SHA1 6cd5382f409f5c3ef495e58b893cc482b91385f9 t/import.t
SHA1 d9ed8a2bb87765ac481afd9da12ef017d4103d64 t/load.t
SHA1 95955d9de562c1a3971aab86239098fca751cef6 t/malloc-info-string-taint.t
SHA1 14972152c9323bc01e836eb73196005ff365b6d8 t/malloc-info-string.t
SHA1 6a5ef0e5d08bb20afea2449e012deee77ba01da3 t/malloc-info.t
SHA1 54b666741d9581476263ccc0d6c4a6ef8b5e4b6e t/malloc-stats.t
SHA1 c4b815409f74158711b36778b8f9ccfe405b78ff t/malloc-trim.t
SHA1 1c06340cbd4cee6f2d13f283e6a37ab405163bcd t/noimport.t
SHA1 c39acf118ab5e6dd599ef8a61fb2ad080906b31d t/test-weaken.t
SHA1 f2ceb7bb4bf68bd24728b90918e63d251fd06183 xt/0-META-read.t
SHA1 c9e7a47e1f397eb5f46d7e4ef21754d9df76e36e xt/0-Test-ConsistentVersion.t
SHA1 d9e7f38a8dcfdb76c56951e4214be8eeda2e2289 xt/0-Test-DistManifest.t
SHA1 9496e4a2a2734c7093ab6961900dd7a55800976e xt/0-Test-Pod.t
SHA1 083242d959c1a9242c874982e4585872a95bec93 xt/0-Test-Synopsis.t
SHA1 63abbc3297914cd38081e95588fd794f9d1f0306 xt/0-Test-YAML-Meta.t
SHA1 1cafa4e23b7a691e09161c0927e6920dd663e2ce xt/0-examples-xrefs.t
SHA1 7bc810750906ae91a13b16c7bd833dd6e1c9741b xt/0-file-is-part-of.t
SHA1 aeb6f41dfae96d04459448f6c3e3dee44691e722 xt/0-no-debug-left-on.t
SHA1 92f32aa7a6bba4fe0ce6dc07a9c2581b67070232 xtools/my-check-copyright-years.sh
sv_pvutf8||5.006000|
sv_pv||5.006000|
sv_recode_to_utf8||5.007003|
sv_reftype|||
sv_ref|||
sv_release_COW|||
sv_replace|||
sv_report_used|||
sv_resetpvn|||
sv_reset|||
sv_rvweaken||5.006000|
sv_sethek|||
sv_setiv_mg|5.004050||p
sv_setiv|||
sv_setnv_mg|5.006000||p
sv_setnv|||
sv_setpv_mg|5.004050||p
sv_setpvf_mg_nocontext|||pvn
sv_setpvf_mg|5.006000|5.004000|pv
sv_setpvf_nocontext|||vn
sv_setpvf||5.004000|v
t/MyTestHelpers.pm view on Meta::CPAN
? "$obj->{$_}" : '[undef]')}
keys %$obj));
}
if (eval { require Devel::FindRef }) {
MyTestHelpers::diag (Devel::FindRef::track($obj, 8));
} else {
MyTestHelpers::diag ("Devel::FindRef not available -- ", $@);
}
}
sub test_weaken_show_leaks {
my ($leaks) = @_;
$leaks || return;
my $unfreed = $leaks->unfreed_proberefs;
my $unfreed_count = scalar(@$unfreed);
MyTestHelpers::diag ("Test-Weaken leaks $unfreed_count objects");
MyTestHelpers::dump ($leaks);
my $proberef;
foreach $proberef (@$unfreed) {
t/malloc-info-string.t view on Meta::CPAN
# it's ok to expect that when testing
#
my $str = $have_malloc_info_string && Devel::Mallinfo::malloc_info_string(0);
skip ($skip_malloc_info_string,
defined $str,
1,
'malloc_info_string() ran');
}
#-----------------------------------------------------------------------------
# weaken of return value
{
my $have_scalar_util = eval { require Scalar::Util; 1 };
if (! $have_scalar_util) {
MyTestHelpers::diag ("Scalar::Util not available: ", $@);
}
my $have_weaken;
if ($have_scalar_util) {
$have_weaken = do {
my $ref = [];
eval { Scalar::Util::weaken ($ref); 1 }
};
if (! $have_weaken) {
MyTestHelpers::diag ("weaken() not available: ", $@);
}
}
my $ref;
if ($have_malloc_info_string && $have_weaken) {
$ref = \(Devel::Mallinfo::malloc_info_string(0));
Scalar::Util::weaken ($ref);
}
ok (! defined $ref,
1,
'malloc_info_string() destroyed by weaken');
}
#-----------------------------------------------------------------------------
# malloc_info_string() induced failure from tmpfile()
my $have_bsd_resource = eval { require BSD::Resource; 1 };
if (! $have_bsd_resource) {
MyTestHelpers::diag ("BSD::Resource not available -- ", $@);
}
t/test-weaken.t view on Meta::CPAN
use strict;
use Test;
BEGIN {
plan tests => 4;
}
use lib 't';
use MyTestHelpers;
BEGIN { MyTestHelpers::nowarnings(); }
my $have_test_weaken = eval "use Test::Weaken 3.002; 1";
if (! $have_test_weaken) {
MyTestHelpers::diag ("Test::Weaken 3.002 not available -- $@");
}
MyTestHelpers::diag ("Test::Weaken version ", Test::Weaken->VERSION);
#-----------------------------------------------------------------------------
# mallinfo()
require Devel::Mallinfo;
{
my $leaks = $have_test_weaken && Test::Weaken::leaks
({ constructor => sub {
return \(scalar(Devel::Mallinfo::mallinfo()));
},
});
ok (! defined $leaks,
1,
'mallinfo() in scalar context');
}
{
my $leaks = $have_test_weaken && Test::Weaken::leaks
({ constructor => sub {
return [ map {\$_} Devel::Mallinfo::mallinfo() ];
},
});
ok (! defined $leaks,
1,
'mallinfo() in list context');
}
#-----------------------------------------------------------------------------
# malloc_info_string(), checking mortalize on the newsv
my $have_malloc_info_string = defined &Devel::Mallinfo::malloc_info_string;
if (! $have_malloc_info_string) {
MyTestHelpers::diag ('malloc_info_string() not available');
}
{
my $leaks = $have_test_weaken && $have_malloc_info_string
&& Test::Weaken::leaks
({ constructor => sub {
return \(scalar(Devel::Mallinfo::malloc_info_string(0)));
},
});
ok (! $leaks,
1,
'malloc_info_string() in scalar context');
MyTestHelpers::test_weaken_show_leaks($leaks);
}
{
my $leaks = $have_test_weaken && $have_malloc_info_string
&& Test::Weaken::leaks
({ constructor => sub {
return [ map {\$_} Devel::Mallinfo::malloc_info_string(0) ];
},
});
ok (! $leaks,
1,
'malloc_info_string() in list context');
MyTestHelpers::test_weaken_show_leaks($leaks);
}
exit 0;
( run in 0.617 second using v1.01-cache-2.11-cpan-65fba6d93b7 )