Closed p5pRT closed 20 years ago
----------------------------------------------------------------- The following code leaks fairly severely on every Linux system I've tried it on\, running various releases of 5.004 and 5.005. It does not appear to leak under Solaris x86 or sparc. I have not been ableto try other operating systems. Gurusamy Sarathy asked me to send this using perlbug\, since it looks to be a problem with perl internals.
The offending code:
#!/usr/bin/perl -w
use MLDBM qw(DB_File); use Fcntl; use strict;
my %in;
tie %in\, 'MLDBM'\, 'testmldbm'\, O_CREAT|O_RDWR\, 0640 || die $1; $in{'1'} = 'a' x 4082; # On the systems that I tested\, this stops leaking if # changed to 4081. This number _may_ be system # dependant. untie %in;
while(1) { tie %in\, 'MLDBM'\, 'testmldbm'\, O_RDONLY\, 0640 || die $1; my $mem = $in{'1'}; untie %in; }
does not leak when tested anymore on similar systems. (probably fixed in MLDBM) clsoed
does not leak when tested anymore on similar systems. (probably fixed in MLDBM) clsoed
Migrated from rt.perl.org#883 (status was 'resolved')
Searchable as RT883$