|
|
|
Your skill will accomplish what the force of many cannot |
|
| PerlMonks |
Re^5: Out of memory problemsby periapt (Hermit) |
| on Oct 22, 2004 at 13:59 UTC ( #401475=note: print w/ replies, xml ) | Need Help?? |
|
Hmmm. You might then have to be sure that $outblocksize is a multiple of 8. It probably will be given the patterns you are working on. There are a couple of implicit assumptions in the code that we might examine. Is the data you are working with byte aligned and of even size? That is, is the data comprised of 32 bit integers? or does the data vary say, a 4 byte integer, followed by a 7 byte string etc? Since you are packing with 'B*' you could be introducing additional bits at the literal byte (8bit) boundary. If the data is evenly spaced, you could set BLOCKSZ to the size of your regex, that might keep everthing aligned properly. Another possibility is that when you change a sequence across the boundary between blocks 01 and 02, you introduce a sequence in block02. Your sequence is rather long and involved though so I rather assumed that wouldn't happen but I guess you should consider this as a fringe case. PJ use strict; use warnings; use diagnostics;
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||