Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Exist something like that for ActiveState-Perl?

See Devel::Size & Devel::Size::Report which does/can do something similar.

(I also just noticed Devel::SizeMe which I've no knowledge of, but comes from a good author, so would be worth investigating.)

I have to admit that I rarely resort to such tools for tracking memory leaks. Especially if threads are involved; I have my own method.

Basically this involves commenting out the bodies of suspect subroutines/methods -- but having them return plausibly 'good' values -- one at a time until I find which one is contributing to the leak. Then zeroing in from there.

With a program as complex as yours, it could be quite a laborious process, but I find it quicker than wading through reams of dumps. Especially where threads are involved which usually forces you to have to cross-relate data from several threads.

Working out which thread (type) is the cause is often quite easy. Just run an empty(ish) thread procedure for each type -- that again does just enough by way of modifying shared data or returning plausible values to allow the program as a whole to continue to run.

Once you've isolated the thread type involved, then apply the function-by-function mechanism as you would for a single threaded app.

It is actually harder to describe than do.

Good luck. (FV?)


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
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.

RIP Neil Armstrong


In reply to Re^5: How can I free the memory of a XML::Simple-Object by BrowserUk
in thread How can I free the memory of a XML::Simple-Object by Bauldric

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

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

    No recent polls found