Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!apple!bionet!ig!uwmcsd1!marque!uunet!seismo!sundc!pitstop!sun!imagen!atari!apratt From: apratt@atari.UUCP (Allan Pratt) Newsgroups: comp.sys.atari.st Subject: Re: How accurate is that show info. thing? Message-ID: <1183@atari.UUCP> Date: 6 Oct 88 19:41:38 GMT References: <881004014748.973404@PCO-MULTICS.HBI.HONEYWELL.COM> <1545@nunki.usc.edu> Reply-To: apratt@atari.UUCP (Allan Pratt) Organization: Atari (US) Corporation, Sunnyvale, California Lines: 29 It's worse than you think: if you create a file and write 10 bytes to it, 1014 bytes are being "wasted" -- files are allocated in "clusters" of 1K each. This is called "internal fragmentation" and is the kind of overhead you have to deal with. The alternative is to allocate files in bytes, which yields zero internal fragmentation but is REALLY SLOW and yields LOTS of external fragmentation. External fragmentation is the space used to keep track of the data: directories (including the root directory) and FATs. Show Info on the desktop adds up the number of data bytes used in each file; that's the "bytes used" field. Then it uses the OS Dfree call to determine bytes available. You will notice that the bytes available is always an even multiple of 1K. The difference between (bytes used + bytes available) and (bytes available on an empty disk) is the internal fragmentation plus subdirectory space. (Root directory and FAT space is not counted in the "bytes available" field for an empty disk). The Dfree call returns several numbers: the number of clusters on the disk to begin with, the number of clusters currently available, the number of disk sectors per cluster, and the size of a disk sector in bytes. Note that a freshly-formatted disk will show two clusters already used. This is a bug in GEMDOS. It can be fixed, but we decided not to, because it creates problems with new versus old ROMs. ============================================ Opinions expressed above do not necessarily -- Allan Pratt, Atari Corp. reflect those of Atari Corp. or anyone else. ...ames!atari!apratt