Sat Jan 27 23:43:00 GMT 2007
VÃ¡clav Haisman schrieb:
> Corinna Vinschen wrote:
>> Hello? Am I in the wrong movie?
>> This is no serious application. I'm demonstrating a problem.
>> Every allocation uses twice as much memory as necessary. This is no
>> problem as long as the process doesn't eat up the virtual memory for
>> a process. As soon as no memory is available, I'd expect the GC kicking
>> in, but it doesn't. Half of the VM is used up for temporary memory
>> and never free'd, not even when the VM is used up. This shows a memory
>> leak. The GC apparently doesn't know about this temporary memory
> Perl doesn't have GC like Java. It uses just reference counting, nothing
> else, IIRC. There must be some reference that gets freed only at the end
> of block. If you think about it makes sense a little bit when we are
> talking about lexical variables.
>> anymore, otherwise it would free it and try to reuse it. It doesn't.
>> Use strace and you'll see. That's not hard to understand, is it?
> If I were you I would report it as a bug to their bug tracker.
It's no bug, it's a perl feature, and often defended.
Even dll's are not unloaded.
If you want to free it, free it explicitly with "undef"
or with lexicals ("my") go out of scope.
Same with PHP and python btw. Only GC languages like lisp, ml and its
derivates have a proper GC.
The perl GC they are talking about only "garbage collects" cyclic
referenced objects on final destruction, to enable proper free() of
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
More information about the Cygwin