delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/01/27/17:17:58

X-Spam-Check-By: sourceware.org
Message-ID: <45BBCF84.7070409@x-ray.at>
Date: Sat, 27 Jan 2007 23:17:40 +0100
From: Reini Urban <rurban AT x-ray DOT at>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.8.1) Gecko/20061101 SeaMonkey/1.1b
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Perl bug?
References: <20070122181727 DOT GC27843 AT calimero DOT vinschen DOT de> <1552 DOT 67 DOT 40 DOT 28 DOT 188 DOT 1169493973 DOT squirrel AT 67 DOT 40 DOT 28 DOT 188> <20070122202137 DOT GC20665 AT calimero DOT vinschen DOT de> <45B540FF DOT 6060101 AT x-ray DOT at> <20070123083753 DOT GE27843 AT calimero DOT vinschen DOT de> <45B62E0B DOT 4080500 AT sh DOT cvut DOT cz>
In-Reply-To: <45B62E0B.4080500@sh.cvut.cz>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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?
>>
>> Corinna
>>
> 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 
externals.
-- 
Reini Urban
http://phpwiki.org/  http://murbreak.at/
http://helsinki.at/  http://spacemovie.mur.at/

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019