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

At that point, creating a ram-based index to the lines of data and only loading the actual lines when required can be extremely effective
Dear BrowserUk,

Would you mind give us the simple example of the above approach?
I can't seem to figure out how to do that in Perl.

---
neversaint and everlastingly indebted.......
  • Comment on Re^2: Attempt to free temp prematurely and unreferenced scalar

Replies are listed 'Best First'.
Re^3: Attempt to free temp prematurely and unreferenced scalar
by BrowserUk (Patriarch) on Feb 22, 2006 at 10:48 UTC

    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.
      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.