Re: Memory issues
- From: "Peter J. Holzer" <hjp-usenet2@xxxxxx>
- Date: Sun, 30 Mar 2008 15:02:27 +0200
On 2008-03-29 23:52, smallpond <smallpond@xxxxxxxx> wrote:
I don't know much about the perl garbage collector,
but memory is not freed immediately when the ref
count goes to 0.
This is wrong. When the ref count goes to zero, perl immediately calls
free.
free may decide to keep the memory around for a subsequent malloc call,
but that doesn't have anything to do with perl - only with your system's
malloc/free implementation (if you use the system's malloc, which is the
default on most platforms, I think).
When I run your program and watch with top, VM goes to 200 MB and
stays there for the whole run. That seems to be some upper bound
where the garbage collector is running.
Perl doesn't have a garbage collector which runs periodically.
hp
.
- References:
- Memory issues
- From: jm
- Re: Memory issues
- From: smallpond
- Re: Memory issues
- From: jm
- Re: Memory issues
- From: smallpond
- Re: Memory issues
- From: jm
- Re: Memory issues
- From: jm
- Re: Memory issues
- From: jm
- Re: Memory issues
- From: smallpond
- Memory issues
- Prev by Date: Re: Memory issues
- Next by Date: FAQ 7.29 How can I use a variable as a variable name?
- Previous by thread: Re: Memory issues
- Next by thread: Re: Memory issues
- Index(es):
Relevant Pages
|