in reply to Re: perl memory usage
in thread perl memory usage
G'day DrHyde - indeed I tried your suggestion, as well as several other variations before posting my question. In the end I settled on the code that seemed to express my question most clearly, not necessarily the code I would use :-)
(Actually the code and question came to me from a colleague, and I was working variations on *his* code).
But I still have a question - when the 100Mb string is allocated I see perl use 200Mb of ram, and after I have undef'd the scalar the memory use drops to 100Mb.
I'm at a loss to explain this behaviour - why would the 200Mb drop to 100Mb? I would have thought it should either drop to nothing (if the buffer was released) or stay at 200Mb (if the buffer was not released).?
regards, Anthony