>>>>> "Eric" == Eric Wong <normalperson@xxxxxxxx> writes: Eric> Part of it is Perl, which (as far as I know) never frees allocated Eric> memory back to the OS (although Perl can reuse the allocated memory for Eric> other things). It does on Linux, of all things. That's because Linux has a smarter malloc/free that uses mmap(2) for the large chunks. On Linux, Perl memory size can apparently grow and shrink nicely. The "old school" advice about Perl comes from sbrk(2)-driven malloc/free. Try: $x[1e6] = "0"; sleep 10; # do a ps here @x = (); sleep 30; # do a ps here and watch the process on Linux. If I'm right, this should show a large process, then a smaller one. If you're getting a growing process though, you probably have a circular data reference. Maybe you have a tree with backpointers, and those backpointers should have been weakened? -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <merlyn@xxxxxxxxxxxxxx> <URL:http://www.stonehenge.com/merlyn/> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html