Skip Menu |
 

This queue is for tickets about the Config-IniFiles CPAN distribution.

Report information
The Basics
Id: 23608
Status: resolved
Priority: 0/
Queue: Config-IniFiles

People
Owner: Nobody in particular
Requestors: melezhik [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: memory leak bug
Date: Sat, 25 Nov 2006 14:00:48 +0300
To: bug-Config-IniFiles [...] rt.cpan.org
From: "Alexey Melezhik" <melezhik [...] gmail.com>
perl -MCPAN -e shell m Config::IniFiles ... Module id = Config::IniFiles DESCRIPTION Read/Write INI-Style configuration files CPAN_USERID WADG (Jeremy Wadsack <dgsupport@wadsack-allen.com>) CPAN_VERSION 2.38 CPAN_FILE W/WA/WADG/Config-IniFiles-2.38.tar.gz DSLI_STATUS Rmph (released,mailing-list,perl,hybrid) MANPAGE Config::IniFiles - A module for reading .ini-style configuration files. INST_FILE /usr/share/perl5/Config/IniFiles.pm INST_VERSION 2.39 ========= use Config::IniFiles; use strict; for (;;) { my $cfg_default = new Config::IniFiles( -file => "../../cfg/default.cfg", -allowcontinue => 1, ); my $cfg = new Config::IniFiles( -file => "../../cfg/config.cfg", -import => $cfg_default, -allowcontinue => 1 , ); }; ========== Hi! I am on debian. perl, v5.8.8 when I run this script I get memory leak (at about several Mb in second speed) -- Alexey Melezhik
Download (untitled) / with headers
text/plain 257b
Show quoted text
> when I run this script I get memory leak (at about several Mb in > second speed)
Unles I miss something, you're creating two new objects per loop, so there's no wonder the memory used by the process grows very fast. -- Close the world, txEn eht nepO.
Subject: Re: [rt.cpan.org #23608] memory leak bug
Date: Tue, 30 Jan 2007 17:20:59 +0300
To: bug-Config-IniFiles [...] rt.cpan.org
From: "Alexey Melezhik" <melezhik [...] gmail.com>
Download (untitled) / with headers
text/plain 881b
Hi! Yeah, but these 2 objects are cerated as lexial scope vars, they are undefed (hopefully) with every loop iteration. But actually they are not! Actually I studied this bug in depth and found out that memory leak occur only if we use "inheritance" in Config::IniFiles constrcutor; (when we attach already existed Config::IniFiles object to newly created one). In this case obects are not freed even though they are binded to lexical scopes; 2007/1/30, Sébastien Aperghis-Tramoni via RT <bug-Config-IniFiles@rt.cpan.org>: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=23608 > >
> > when I run this script I get memory leak (at about several Mb in > > second speed)
> > Unles I miss something, you're creating two new objects per loop, > so there's no wonder the memory used by the process grows very fast. > > -- > Close the world, txEn eht nepO. >
-- Alexey Melezhik
Download (untitled) / with headers
text/plain 780b
I cannot seem to reproduce this bug with the following test program, here on Mandriva Linux Cooker with either the system perl-5.10.0 or perl-5.8.x-latest: {{{{{{{{{{{{{ use strict; use warnings; use lib "./lib"; use Config::IniFiles; for (;;) { print "Foo\n"; my $cfg_default = Config::IniFiles->new( -file => "./win1.ini", -allowcontinue => 1, ); print "Bar\n"; my $cfg = Config::IniFiles->new( -file => "./win2.ini", -import => $cfg_default, -allowcontinue => 1 , ); } }}}}}}}}}}}}}} win1.ini and win2.ini are copies of a win.ini file from an old Windows partition. Perl runs but the memory usage does not seem to grow, even when ran for several minutes. So I'm closing until I receive more information.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.