Are languages that have mark and sweep garbage collection better about returning memory to the system than languages like Perl that use reference count garbage collection.
Also if you really want to see how and why Perl is using memory, take a look at Tim Bunce's Devel::SizeMe<http://search.cpan.org/~timb/Devel-SizeMe-0.06/lib/Devel/SizeMe.pm> . -- David On Sat, Apr 6, 2013 at 12:20 AM, Conor Walsh <[email protected]> wrote: > 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 > [email protected] > http://mail.pm.org/mailman/**listinfo/boston-pm<http://mail.pm.org/mailman/listinfo/boston-pm> > _______________________________________________ Boston-pm mailing list [email protected] http://mail.pm.org/mailman/listinfo/boston-pm

