in reply to Re: when a script runs out of memory
in thread when a script runs out of memory

Maybe something can be done using ulimit first from the shell to set the maximum amount of memory the process can use, and then $^M to reserve a little emergency memory inside perl.

Replies are listed 'Best First'.
Re^3: when a script runs out of memory
by wazoox (Prior) on May 11, 2005 at 11:34 UTC
    That's a good idea. However most of the time if the script really hits the point where it sucks up all available RAM, there's probably something to optimize :) In my case, the script indexed several millions files from 80 terabytes of storage in one big hash : I had to splice the job in parts to use less memory.