develooper Front page | perl.perl5.porters | Postings from January 2003

Re: Freeing code

Thread Previous | Thread Next
From:
notthatbbennett
Date:
January 28, 2003 04:49
Subject:
Re: Freeing code
Message ID:
2003-01-28-1419-20426@dbl-b.com
on 2003-01-27 16:38:40-06, Dave Mitchell <davem@fdgroup.com> wrote:
>On Mon, Jan 27, 2003 at 08:52:14AM -0600, Bill Bennett wrote:
>> It seems to leak rather slowly, so are you sure you're giving it
>> enough time?  I also tried this on my laptop which is running a
>> stock install of SuSE 8.1  It leaks more slowly there, but steadily.
>> (This may be simply due to the fact that the laptop is much slower).
>
>I see a *very* slow leak - in the order of a few 10s of K per 1M
>iterations. Is that the same as you're seeing?
>

Yes.

>I see a similar very slow leak on the one-liner
>
>    eval '' while 1;
>
>Which increases in size by a page (4K) every 10-20 secs
>

That's about the rate I see.

>I suspect this is not so much a leak, as fragmentation by the malloc
>library (ie perl is freeing everything it mallocs). I'm checking further.
>

Well, the companion program, which creates a closure (and does 
everything but the eval) doesn't leak.  Maybe it just never has to
do a malloc?  Interesting.

Thanks for all the information,
Bill B.


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About