Re: Memory issues



On 2008-03-29 13:55, jm <jm@xxxxxxxxx> wrote:
Joost Diepenmaat a écrit :
jm <jm@xxxxxxxxx> writes:

Based on the fact that perl contains many memory leaks,

It doesn't.

I wrote a sample of code to illustrate the issue.
[...]
Calling function aa (one or several times) makes a memory leak (or
memory empreint) of 150 Mbytes.
I mean that once I called this function I do not know how to free those
150 mega bytes, but if I call this same function again I will not loose
more memory.

Then it's not a memory leak. A memory leak is when memory which has been
allocated cannot be (re)used. But in your case it can be reused (and is,
if you call the function again).

Perl is certainly wasteful with memory - The data structures have a lot
of overhead, and it often doesn't free memory because it might need it
again later - but AFAIK perl itself doesn't leak. (Perl programs often
leak - the garbage collector cannot detect cycles, for example, so
the programmer has to remember to do that).

hp
.



Relevant Pages

  • Need help with leaks
    ... but I have a big memory leak. ... I had to do some sloppy coding to leak memory in Perl. ... forgetting a few variables, as on each pass the memory usage goes UP ...
    (comp.lang.perl.misc)
  • [NT] Services for UNIX 2.0 Suffer from a Remotely Triggered Memory Leak
    ... Services for UNIX 2.0 Suffer from a Remotely Triggered Memory Leak ... 2000 are not affected by the vulnerability. ... * A vulnerability that could enable an attacker to cause the NFS service ...
    (Securiteam)
  • RE: Memory increasing even when in debug-break
    ... there are 2 types of memory leak in .Net: ... More interesting is the debugger breaks while memory still increasing ... Microsoft Online Community Support ...
    (microsoft.public.vsnet.debugging)
  • Re: Memory leak in the Driver
    ... will it also work for device driver ??? ... if the following application is used then, there is no memory leak. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Need help with leaks
    ... but I have a big memory leak. ... I had to do some sloppy coding to leak memory in Perl. ... I HAVE added a sub to reset everything to '' and, ...
    (comp.lang.perl.misc)