in reply to How do I free memory allocated to an array

see

perldoc -q "program shrinks"

specifically the part that says

You can't. On most operating systems, memory allocated to a program can never be returned to the system. That's why long-running programs sometimes re-exec themselves. Some operating systems (notably, FreeBSD and Linux) allegedly reclaim large chunks of memory that is no longer used, but it doesn't appear to happen with Perl (yet). The Mac appears to be the only platform that will reliably (albeit, slowly) return memory to the OS.

Manav
  • Comment on Re: How do I free memory allocated to an array