Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Well, you don't provide any example code, so it's hard to give good advice. Given your description, though, I can make a couple of guesses.

My first guess is that it isn't a memory leak, but simply that you're running out of available memory (a memory leak is a very specific kind of bug).

Given that, my second guess is that you're loading the entire files into memory before operating on them. If your records are large enough, the combination of doing that and building your output data structure might put you over your available RAM.

One simple way to avoid that is to put your data -- including your output structure -- into a database. That way, the database engine takes care of memory allocation, etc. DBD::SQLite is very nice for this, as it's a simple RDBMS entirely contained in a Perl module.

Beyond that advice, memory bugs are difficult to trace down without seeing code. Share some code, and you'll likely get more help. You may also want to check out How (Not) To Ask A Question for tips about asking questions on PerlMonks in a way that's optimized for getting good answers.

<radiant.matrix>
Ramblings and references
The Code that can be seen is not the true Code
I haven't found a problem yet that can't be solved by a well-placed trebuchet

In reply to Re: Name matching -memory leakage by radiantmatrix
in thread Name matching -memory leakage by deepuceg

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 about the Monastery: (8)
As of 2024-04-24 10:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found