in reply to Code stalls...possible memory leak?

The first thing I would do is bring up some performance monitoring tools. Does it chew up memory? When it stalls, is it pegging the CPU? Does it chew up handles or other OS resources?

Also, post your OS details and Perl version number. —John

  • Comment on Re: Code stalls...possible memory leak?

Replies are listed 'Best First'.
Re: Re: Code stalls...possible memory leak?
by tshabet (Beadle) on Aug 21, 2001 at 21:39 UTC
    Hi John, I am running 2000 NT on my personal machine, though the script performs with similar results on Unix variants. I'm running 5.005_02 Perl. As soon as I start to execute the script, my CPU pegs to 100%, memory hits about 50% and stays there. At any given point, Perl will be using 85-99% of my CPU and it stays pegged after the script stalls. I would expect (although I could be wrong) that a genuine memory leak would show steadily larger increments of memory usage, but in this case everything pretty much stays the same from start to abortive finish. What tools would you recomment for benching code?
      http://www.sysinternals.com.

      Get the (freshly updated) tools to view handles, and see if there is a handle leak. Also "process explorer" will give more details than just looking at the totals in Task Manager.

      Reduce the available memory and run again. Does the problem spot pull back as well? Is it the same spot on Unix as well? If always the same spot, it sounds like something in the logic itself, not memory.

      —John