in reply to Re: file truncate not working on 128GB file in Windows
in thread file truncate not working on 128GB file in Windows

Well, TinyPerl 5.8 says "MSWin32-x86-multi-thread"

and I can confirm that it can open a 7GB file and seek way past the 4GB mark and correctly read from the file using the sysopen, sysseek, and sysread functions.

The 4GB limitation applies to DOS, because the DOS system calls limit the file pointer to 4GB. So, you can't seek past the 4GB mark with programs written for DOS mode. EDIT: Actually, I tested Perl 5.004, and it won't even open the file that is larger than 4GB. But that's ancient technology right there.

  • Comment on Re^2: file truncate not working on 128GB file in Windows

Replies are listed 'Best First'.
Re^3: file truncate not working on 128GB file in Windows
by NERDVANA (Priest) on Feb 12, 2024 at 05:39 UTC
    For the sake of research, can you confirm the $Config{ivsize} of your tinyperl?
      I'm not at my computer right now, but does ivsize refer to the pointer size? I use WinXP Pro SP2 32-bit, so all my Windows programs are 32 bit.

        $Config{ivsize} refers to the size of an IV, the Integer Value slot of the SV, the Scalar Value (everything that starts with $ in Perl).

        ivsize and ptrsize can in theory deviate, on a 64-bit processor with a 32-bit system, you could still have ivsize=8 and ptrsize=4.

        To learn about how Perl stores the different values, see Perlguts Illustrated.

        This is also on CPAN, but CPAN refuses to find the distribution, most likely because the distribution does not contain distribution metadata...