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

For the sake of research, can you confirm the $Config{ivsize} of your tinyperl?

Replies are listed 'Best First'.
Re^4: file truncate not working on 128GB file in Windows
by harangzsolt33 (Deacon) on Feb 13, 2024 at 00:21 UTC
    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...

        And even on a 32-bit processor with 32-bit x86 instructions, you can still have a 64-bit IV because the C language has a 'long long' or 'uint64_t' that perl can use. They aren't efficient, but they're used anywhere you want to do 64-bit file offsets in 32-bit land.