in reply to demonstrate that perl can give back memory to the OS

The breakpoint on Win23/AS5.8.6 seems to be that for any allocation over 64k, a separate request is made to the OS (VirtualAlloc()) to fulfill that allocation rather than allocating from the existing heap. And if that entire allocation is released in one go, then it will be released back to the OS memory pool.

YMMV on other setups.

This can be verified by doing:

$x = chr(0); $x x= 2**16; undef $x;

And noting the MemUsage as displayed in the Task Mananger or PrcessExplorer after each step.

A screen grab. Note the 64k bump in the middle trace.)


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."