in reply to Re: garbage collection guts
in thread garbage collection guts

Memory can be released to the OS on any system that supports it. If Perl is compiled to use the system malloc() (rather than its own internal version of malloc()) then it does whatever the system malloc() does. All of which would be an academic point, except that on GNU/Linux systems with glibc2, the system malloc() does return memory to the O/S if it thinks that might be beneficial.

I was really surprised when I found this out. My Perl program was chugging along, and it suddenly got smaller. I couldn't believe my eyes. I had to spend the next hour digging into the source code of the free() function until I found the responsible code.

The guy who wrote that malloc() package is a genius.