Large (>2 GB?) file size support in Konqueror

Michael Matz matz at kde.org
Mon Jun 24 14:52:15 BST 2002


Hi,

On Mon, 24 Jun 2002, Fabian Wolf wrote:

> This happened to me a lot while writing the dvd IO-Slave. It was caused
> because KIO::filesize_t was too small to hold filesizes over a certain value
> (We count bytes!) It was then changed to an "unsigned long long int". This
> _should_ be sufficient, but well, on 32bit platforms it probably won't take
> long before we run out of space to hold filesize values that big.

long long is at least 64bit on every platform we support, so it's enough
everywhere.  Nevertheless there might still be places in KDE, which only
use 32bit sizes.  It's also a slight problem to change some of them, as
changes in type are an API change.  I'm for instance right now not sure,
if Qt correctly deals with large files.

> How is the kernel handling those huge numbers? Spanning them across several
> variables?

Huh?  Trivially.  As 64bit values.  (Ok, internally the kernel often does
long long arithmetic by hand, i.e. working on high and low part
separately, but that's just because gcc's long long arithmetic was
historically worse than hand written code).


Ciao,
Michael.





More information about the kde-core-devel mailing list