Path: utzoo!attcan!uunet!husc6!bloom-beacon!tut.cis.ohio-state.edu!osu-cis!att!chinet!mcdchg!clyde!watmath!watcgl!watmum!javoskamp From: javoskamp@watmum.waterloo.edu (Jeff Voskamp) Newsgroups: comp.sys.atari.st Subject: Re: How accurate is that show info. thing? Summary: It's accurate once you know what it's measuring Message-ID: <6164@watcgl.waterloo.edu> Date: 5 Oct 88 17:02:13 GMT References: <881004014748.973404@PCO-MULTICS.HBI.HONEYWELL.COM> Sender: daemon@watcgl.waterloo.edu Reply-To: javoskamp@watmum.waterloo.edu (Jeff Voskamp) Organization: U. of Waterloo, Ontario Lines: 36 In article <881004014748.973404@PCO-MULTICS.HBI.HONEYWELL.COM> Friesen%PCO@BCO-MULTICS.HBI.HONEYWELL.COM writes: > >I am in the process of programming an all resolution painting program in >GFA Basic, and I decided to put in a routine to show you how much free >disk space you have on a disk. I ran the procedure and it said that I >had 0K available, but only 622367 of the 720000+Bytes were used. I used >the show info. option on the desktop and got the same results. What >does this mean? Can it be corrected? Here's what actually goes on as far as disk free space is concerned: Free space is defined as the number of bytes available in free sectors on the disk. Used space is defined as the total number of bytes used in all files on the disk. The thing is that space on the disk is allocated in multiples of 1k (2 sectors). Therefore while in your case 622367 bytes are being used the other 90K+ bytes are being "lost" in chunks of between 1 and 1023 bytes per file. (This is a case of what is known as internal fragmentation; the same thing can happen with memory allocation (except for the Malloc bug which doesn't let you go on that long (TOS 1.4 will let you see this in action (from what I've heard a lot of work has gone into it)))). This can be confusing since it means that even though there are 0 bytes free on a disk you can still write up to 1023 bytes PER FILE by appending the data, and there's nothing you can do about it. If you think it's fun on a floppy, try a 10Mbyte hard disk partition with 3000+ small files. It looks like about 1.5Mbytes is missing! Hope this helped. Jeff -- "I've lost my stutter!! How much wood could a wood chuck chunk if..." Ken in "A Fish called Wanda" bang path: ...{!uunet}!watmath!watmum!javoskamp domain : javoskamp@watmum.uwaterloo.ca or javoskamp@watmum.waterloo.cdn