size of a file
Doug Gwyn
gwyn at smoke.BRL.MIL
Thu Jan 18 23:34:06 AEST 1990
In article <10890 at encore.Encore.COM> peralta at multimax.encore.com (Rick Peralta) writes:
>In most implementations a pointer to the offset in the file is maintained.
>The file (and filesystem) cannot ecxcede the limit of the int. So, how
>can a very large file be accommodated? On a 16 bit machine this must have
>been a critical problem. Does anyone know how it was overcome?
On modern UNIX systems the file offset is a long (at least 32 bits).
This still causes problems for a few systems with huge files..
Before long was added to C, i.e. up through Sixth Edition UNIX,
it was necessary to perform a seek in two parts, one involving
a (512-byte) block offset and the other involving a byte offset
(usually within the block). The 16-bit system call was seek(),
thus the improved 32-bit version was called lseek().
More information about the Comp.unix.questions
mailing list