in reply to Sort taking a long time to clean up

I bet the machine with the slow cleanup is a Linux box? There's a bug in some versions of malloc that takes ages to free stuff.

Dave.

  • Comment on Re: Sort taking a long time to clean up

Replies are listed 'Best First'.
Re^2: Sort taking a long time to clean up
by tachyon (Chancellor) on Sep 15, 2004 at 21:45 UTC

    As you note there is/was a malloc bug that led to slow destruction of big data structures. A workaround is:

    use POSIX; # code here POSIX::_exit(0);

    This skips the normal perl clean up and leaves it to the OS.

    cheers

    tachyon

      Thanks, that's good to know. I compiled a new perl with the option "use the malloc that comes with perl" and the problem goes away.