Re: Memory issues
- From: smallpond <smallpond@xxxxxxxx>
- Date: Sat, 29 Mar 2008 16:52:45 -0700 (PDT)
On Mar 29, 7:40 pm, jm <j...@xxxxxxxxx> wrote:
jm a écrit :
Modifying a little bit again the script, and checking execution with
ltrace, I observed malloc is called 1871 times when free is just called
922 times.
Isn't it an issue?
and did:
ltrace perl essai.pl 2>&1 | grep 'malloc\|free\|realloc' | perl
observe_malloc_free.pl > memory.log
with observe_malloc_free.pl in mail bottom.
Hereafter, this result of memory leaks:
1 NULL is freed, but thats not a memory leak!
the rest can be read like this:
7 10 Mbytes data are not freed.
1 13 Mbytes data is not freed
8272 4 bytes data are not freed
9843 4080 bytes data are not freed
but I still do not know why...
I don't know much about the perl garbage collector,
but memory is not freed immediately when the ref
count goes to 0. 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. Memory use does
not continue to go up.
.
- Follow-Ups:
- Re: Memory issues
- From: Peter J. Holzer
- Re: Memory issues
- From: jm
- Re: Memory issues
- 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
- Memory issues
- Prev by Date: Re: Memory issues
- Next by Date: Re: Memory issues
- Previous by thread: Re: Memory issues
- Next by thread: Re: Memory issues
- Index(es):
Relevant Pages
|