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.
| [reply] |
Which FAQ is that? I read the OO faqs (perltoot,perlobj, perlbot,
as well as searched PAN && perlmonks 4 garbage collection), but
appart from the stuff about self-reffing obj. in the BOT, I did not
find anything other than the OOstuff.
Your answer explains what is happening here, anyway, so thanks.
But I would like a pointer so that I can read up for myself. | [reply] |