On 4/6/2013 12:01 AM, Adam Russell wrote:
Ah! Ok, so maybe I was confused about this. Even if I set the last reference to an object to undef perl will keep the memory until exit? The high water mark for memory usage never goes down? Well, that is fine I suppose, it isn't like this process will be really all that long lived. It also means that the iterative form of this algorithm will use all that much less ram, I think.

Yeah, this is how the perl executable works. Undef'd (well, garbage-collected) stuff becomes free to be re-used by additional stuff within that particular instance of perl, but never to the OS. Uri's point about rarely-used pages getting swapped to disk by the OS stands, though.

-C.

_______________________________________________
Boston-pm mailing list
Boston-pm@mail.pm.org
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to