perl 5.10.0 source says
Perl_do_vecget(pTHX_ SV *sv, I32 offset, I32 size)
I32 is perl type alias for 32 bit signed integers.

I don't know if there is any reason to be using I32 for indexes instead of IVs (native ints or bigger). Vectors are not the unique data structure with that limitation, the I32 type is used pervasively inside perl code for index values, for instance, arrays or substr also use 32 bit indexes.

The work around is to create your own XS vector module with support for 64bit indexes, but anyway, fill a bug report with perlbug, and it may be fixed for 5.12!


In reply to Re: 2GB limit to vecs by salva
in thread 2GB limit to vecs by bop

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.