in reply to Re^2: Attempt to free temp prematurely and unreferenced scalar
in thread Attempt to free temp prematurely and unreferenced scalar

Are you after read-only or read-write acess to the file in question?


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^4: Attempt to free temp prematurely and unreferenced scalar
by neversaint (Deacon) on Feb 22, 2006 at 11:00 UTC
    Dear BrowserUk,

    After Read-only. I've also just looked through the input file size. I realized that it's still within reasonable size (5k-60k), where I have 1GB RAM.

    I've tried to see the size of the some potentially large variable using Devel::Size. All of them are still reasonable (around 20MB).

    Apart from my question to your posting. Is there a way to check, which part of my code are producing the "Out Of Memory" message? like stated in my OP.


    ---
    neversaint and everlastingly indebted.......

      Honestly, without seeing the code, anything would be (another) guess. What are you doing with 60k of input data to create even 1 20MB datastructure?


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.
        Dear BrowserUk,
        Basically what my code is doing is to take sets of DNA input sequences, and find a conserved substrings within them.

        The size of the variable expand, because for each length "W" strings from the input sequence I collect the again the substrings of it.

        So here I ran the "main_process" subroutine multiple time given parameter sets (generated with gen_param subroutine).

        Dont' be overwhelmed with my code below. You can ignore much of it. The out of memory message only occur after it completes the first set of parameters, and then it breaks. See the last portion of "main_process" subroutine.

        Really hope to hear from you again.

        ---
        neversaint and everlastingly indebted.......