Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^3: Strange memory leak using just threads

by zentara (Archbishop)
on Sep 20, 2010 at 15:01 UTC ( [id://860856]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Strange memory leak using just threads
in thread Strange memory leak using just threads

And the memory usage is rock steady. And that has been true for a long time. So, what does that tell you? Your knowledge is out of date. Your platform--be it the pthreads or memory management or whatever--has an underlying problem that cannot be directly addressed by, nor attributed to, Perl. So stop doing that.

So what does that tell me? First, his script gained memory and your's didn't. I observe the same behavior. So a script written 1 way in Perl may leak, and written another may not. Furthermore, these 2 sample thread scripts are the ultimate in simplicity. Leakage problems become more pronounced when you start adding objects to threaded programs.

I have the latest Slackware, and before I believe my slackware c libs are faulty, I have to assume Perl's behavior is somehow causing it.

Since this memory leak problem keeps coming up, all I can do is to mention that thread reuse does prevent the problem.

But you are more of a thread expert than me, so if you insist that perl threads do not have memory problems, and it is the underlying c library's fault, I call that a cop out. If threads have no problems with ref counts and memleaks, why did you post threads: spawn early to avoid the crush.? Or is that information from you already outdated?


I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh
  • Comment on Re^3: Strange memory leak using just threads

Replies are listed 'Best First'.
Re^4: Strange memory leak using just threads
by BrowserUk (Patriarch) on Sep 20, 2010 at 15:43 UTC
    First, his script gained memory and your's didn't. I observe the same behavior. So a script written 1 way in Perl may leak, and written another may not

    His original doesn't leak here either. All my changes do is run more threads concurrently in an attempt to amplify any problem should it exist. On my system, it doesn't.

    But Vista and Slackware are fundamentally different systems. Hence my attribution to the platform. If the problem was inherent in the (common) Perl sources, it would manifest itself everywhere. It doesn't. So then you have to start looking at the differences.

    See also, (indirectly via 860733), Dave_the_m's comment.

    I'm pretty sure he runs some version of *nix or other. So, maybe it is not the platform, but how Perl is compiled for a given platform.

    Just attributing it to threads isn't very useful.

    Or is that information from you already outdated?

    4 1/2 years, 2 major releases; 7 or 8 subversion releases. Yes. I would think it is fair to say: that is out of date.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
      Please don't tell me I need to start using Microsoft Vista in order to get Perl threads working right. :-)

      I'm not really a human, but I play one on earth.
      Old Perl Programmer Haiku ................... flash japh

        I'm pretty sure that Dave_the_m feels much the way you do, and he seems to be able to make them work, without sullying himself with the unclean :)

        Ultimately, someone who experiences the failure, needs to track down the commonalities and differences between their system, and a similar system that works.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://860856]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (6)
As of 2024-04-19 11:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found