Forum > FPC development

TFileStream file size limit

<< < (8/8)


--- Quote from: Alextp on January 22, 2022, 09:42:01 pm ---It's strange, because I have the same test code, and I got 0-sized file.

--- End quote ---
Your code also successfully creates a 3 GB file. Maybe there is no disk space, or you did not wait for the end of the program?

@ASerge, with the last FPC modification, it works good (I tested before this, with the Old Write() which failed on 3Gb size).

@Alextp & @ASerge
I've updated the FPC development sources and now stream data can be saved in files larger than high(longint), at least on linux-x86_64. So, to me it appears like the problem has been solved.
Good job!

A stream is always looking forward (any look-backs are Aberration by theory). A windowed stream on top of a file has unlimited size (upto the ordinal for which it is declared). That means that overlapped files applied to a windowed stream are not limited by any size and can be as large as the disk size allows. Strange nobody mentioned that. It is just basic computer science, very basic. A windowed stream can be implemented as a descendant of TStream or TFileStream.

Just my 2 cents. And OS independent. I am sure this is already implemented somewhere by someone in Pascal.


[0] Message Index

[*] Previous page

Go to full version