Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/3/84; site maynard.UUCP Path: utzoo!linus!alliant!maynard!campbell From: campbell@maynard.UUCP (Larry Campbell) Newsgroups: net.micro.amiga,net.unix-wizards Subject: Re: Speed of seeks Message-ID: <297@maynard.UUCP> Date: Fri, 16-May-86 20:06:01 EDT Article-I.D.: maynard.297 Posted: Fri May 16 20:06:01 1986 Date-Received: Sun, 18-May-86 15:29:33 EDT References: <12593@ucla-cs.ARPA> <645@baylor.UUCP> Distribution: net Organization: The Boston Software Works Inc., Maynard, MA Lines: 18 Xref: linus net.micro.amiga:6897 net.unix-wizards:15066 > Incidentally, despite the poor design of the files a seek() does not have to > read every sector... a mistake often made by library writers is to try to > make seek offsets simple integers. According to the library, the argument > to an absolute seek() (lseek(fd, off, 0) or lseek(fd, off, 2)) only needs > to be the returned value from a tell() call: it may indeed be a magic cookie > like a sector/offset pair (and in fact "magic cookie" is the way it's described > in the manual). It is under RSX/11M and on the ATARI 800. > -- Peter da Silva > -- UUCP: ...!shell!{baylor,graffiti}!peter; MCI: PDASILVA; CIS: 70216,1076 Wrongo. First, the manual describes the offset as a long (NOT a "simple integer" nor a "magic cookie"). Second, if the offsets AREN'T integers, then almost any database library or package won't work (like dbm(3)), because they often hash keys into offsets in the index file. -- Larry Campbell The Boston Software Works, Inc. ARPA: maynard.UUCP:campbell@harvard.ARPA 120 Fulton Street UUCP: {harvard,cbosgd}!wjh12!maynard!campbell Boston MA 02109