in reply to Re: Out of Memory..
in thread Out of Memory..

Hello There,
Thanks a bunch for your Quick reply.
Dang Strawberry is indeed 32bit.. Dang...
I need to the the big files as is as they are dumps of file systems/registry/memory and I need a Diff of 'em.
So if I do Line by line I get the problem that it won't find the extra inserted lines it will see everything wrong after an insert.
So its deeper then line by line. Is there a way to still do this? I ported this from C as I had a little issue with my LCS Algorithm..

--
Robin

Replies are listed 'Best First'.
Re^3: Out of Memory..
by Corion (Patriarch) on Dec 15, 2009 at 09:23 UTC

    I doubt that you'll get meaningful differences anyway. Briefly looking at String::Diff, I guess that it'll likely take at least quadruple the memory size of its input, because it returns strings with the differences marked. You can maybe try to port String::Diff to work with files instead of strings.

    Also, I'm not sure whether String::Diff has a concept of lines, and also your registry dumps likely don't have a concept of lines. Maybe using an existing, external diff tool is an approach. Alternatively, look at Algorithm::Diff, but I don't know whether it has more benign memory requirements.

      Thanks I'll have a look at Algorithm::Diff.
      Also, I found the BasicPerl Function Tie I never saw, I ain't sure (havn't read exactly what it does yet) but in the Sample Codes it looks usefull.
      Thanks anyway, Ill have a look into these things. Ill rewrite this. And by the end of the day if I couldn't find a way to fix this I'll have to breakout the nasty qx!!; to execute an external command.

      Thanks!

      --
      Robin