in reply to Re: (tye)Re: Perl Memory Leak ??
in thread Perl Memory Leak ??

Using the while loop as you have suggested still increases by 4 bytes (in both cases).

Do you mean it increase by 4 bytes once, or every single time it goes through the loop?

I don't follow your 'settling in' argument.

Perl need a certain amount of memory to do what you asked for. Taking that amount is not a "leak" but just the normal process of running a program. After allocating enough memory, the program should "settle in" and not need to get more unless your data grows.

On the other hand, if the program grows constantly when you aren't adding any data, that would be a leak. If it really leaks, you should be able to run that loop tye posted until it consumes all the memory on your machine and goes into swap.

Replies are listed 'Best First'.
Re: Re: Re: (tye)Re: Perl Memory Leak ??
by eformat (Initiate) on Dec 05, 2001 at 22:34 UTC
    Hi there, it increases by 4 bytes every time  $_[0] is assigned to 'foo' (every time round the loop) and carries on increasing ad-infinitum. Mike
      Sounds like a leak in 5.0x that was fixed in 5.6x. I would suggest you upgrade. :-)

      ------
      We are the carpenters and bricklayers of the Information Age.

      Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.