in reply to The Long Way 'Round...

Even when you undefine variables, the memory used is not returned to the operating system until the process terminates
I'm not a FreeBSD user (so this may or may not be true), but usually the OS can reclaim memory that's munmap'ed. Of course you'd also need a special version of perl that used mmap instead of malloc, and each variable would take a VM page of storage (4k on x86), but that's another story.

Replies are listed 'Best First'.
Re^2: The Long Way 'Round...
by Fletch (Bishop) on May 03, 2005 at 17:53 UTC

    I believe if you use the system malloc(3) on FreeBSD rather than Perl's then memory does get returned to the OS when free(3) gets called.

    Update: Well, it's not working on my FreeBSD 5.0 box but it does on a Tiger box; both have usemymalloc='n'. Strange . . .