[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]

Re: PDL-P: Memory leak in zeroes



In <m12DlVX-002IG4C@csnote.mph.auckland.ac.nz>, c.soeller@auckland.ac.nz writes
:While looking for the memleak I found that the following leads to
:continuous growth of my perl process:
:
:  sub testfunc {
:    $_[1] = 1 if ($#_ < 1);
:  }
:
:  while(1)
:  {   
:    testfunc(0);
:    $i++;
:    print "$i\n" if $i % 500 == 0;
:  }
:
:Should one consider this as a perl bug?

Absolutely. This bug was introduced between 5.005_02 and 5.005_03; in the
current development track, it was fixed between _61 and _62. It also
appears in 5.004_05 (but not 5.004), so I would guess that it appeared
also between 5.004_04 and 5.004_05.

I don't know what 5.005_62 patch might have fixed it; perhaps this one:

[  4195] By: gsar                                  on 1999/09/19  21:30:18
        Log: avoid clearing @_ at all for faster subroutine calls; fix bugs
             in passing around references to @_, eg C<sub foo { \@_ }>; add
             tests for the same
     Branch: perl
       + t/op/args.t
       ! MANIFEST cop.h pp.c pp_ctl.c pp_hot.c

Hugo


Follow-Ups from:
Gurusamy Sarathy <gsar@ActiveState.com>

[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]