Data-Pool-Shared
view release on metacpan or search on metacpan
xt/endurance_leak.t view on Meta::CPAN
use strict;
use warnings;
use Test::More;
# Endurance: 500k random ops, observe RSS. Perl handle lifetimes must
# be correct â no SV leaks in XS callbacks. A growing RSS over time
# indicates a leak.
use Data::Pool::Shared;
my $p = Data::Pool::Shared::I64->new_memfd("endur", 512);
sub get_rss {
open my $fh, '<', "/proc/$$/status" or return 0;
while (<$fh>) {
return $1 if /^VmRSS:\s+(\d+)/;
( run in 1.839 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )