[meanwhile way off-topic] Re: Filesize limitation

=?ISO-8859-1?Q?Kristian_K=F6hntopp?= (kris@koehntopp.de)
Wed, 5 Nov 1997 17:31:09 +0100 (MET)


> You mean change off_t to long long, so it is 64-bit? Is that
> posix-compliant?

Don't know. If it isn't, POSIX is junk (perhaps fixable junk,
but still junk).

> A modulo, an array lookup for the filename, and a subtraction don't
> impress me as an exceptionally high price to pay to let the libc sizes
> work until they are enlarged via a standards-compliant process.

There is more to it. For example, you either waste file
descriptors, because you keep your underlying files open or you
waste time, closing and opening your underlying files. Or you
are beginning to implement an LRU cache of open file
descriptors for your hidden file array to trade off speed
against file descriptors.

And all this won't help you anything if the application in
question comes binary only or you begin playing tricks with
libc's open or start similar insanities.

> Just how many files bigger than 2gb do you have, anyway? We should break
> the vast majority of portable, pd or gpl C code for that vast number of
> users that use files bigger than 2gb?

Yes, we should. Like we broke most portable, pd or gpl code
when we made sizeof(int) != sizeof(void*) on 64 bit
architectures. Did make a lot of trouble when OSF/1 and the
alpha were introduced, but did a whole lot of good things to
code quality.

Kristian