in reply to How do I pre-allocate an array of hashes?

The reason perl is going round trying to free everything up is primarily to ensure that any remaining objects with DESTROY methods get them called appropriately.

I wouldn't particularly recommend this approach, but if you are confident that you don't have any objects needing DESTROY at exit, you can avoid the cleanup by calling instead POSIX::_exit at the end of the program.

Hugo
  • Comment on Re: How do I pre-allocate an array of hashes?

Replies are listed 'Best First'.
Re: Re: How do I pre-allocate an array of hashes?
by jaa (Friar) on Feb 24, 2003 at 11:14 UTC
    I wondered if we should blame Perl garbage collection too - but our tests with replacing libc6 2.2.5 with libc6 2.3.1 show that Perl is not to blame - the problem is in the memory management in libc6

    Thanks for the pointer to the POSIX::_exit - but this is only useful if the problem happens at the end of processing, in fact we have the 'slow free' problem both at the end, and during processing.

    Jeff