On Mon, Dec 1, 2008 at 13:02, Rob Dixon <[EMAIL PROTECTED]> wrote:
> Chas. Owens wrote:
>>
>> It looks like there is an issue in the compilation of regexes that leaks 
>> memory:
>>
>> perl -le 'qr// while 1'
>>
>> There does seem to be a fix*.
>>
>> * http://www.gossamer-threads.com/lists/perl/porters/232045
>
> Darn. I write empty regexes all the time. Back to Perl 4...
>
> R
>

Unfortunately, this affects all regex compiles, not just empty ones
(that was just a short example to test to see if your version has the
problem).  So, if you have any qr// operators in loops or you say
something like

my $foo = "test";

while (<>) {
    /$foo/;
}

Each compile of a regex will leak a little more memory.  For the most
part programs will not be adversely affected by this leak (due to the
generally small number of regexes compiled), but daemons that compile
regexes on the fly will slowly consume more and more memory.

-- 
Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to