in reply to Re^2: 2GB limit to vecs
in thread 2GB limit to vecs
I am on a 64 bit machine
If there is any chance that your strings will get bigger than 4GB, I think you just need to change the if for a while and the rest would take care of itself:
sub myvec(\$$$) :lvalue { use constant TWO_GB => 2**31; my( $ref, $offset, $bits ) = @_; while( $offset > TWO_GB - 1 ) { $offset -= TWO_GB; $ref = \substr $$ref, ( TWO_GB * $bits ) / 8; } CORE::vec( $$ref, $offset, $bits ); }
but again that's untested, so check it and convince yourself.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: 2GB limit to vecs
by bop (Acolyte) on Jul 03, 2008 at 13:15 UTC |