Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!decwrl!shelby!polya!kaufman From: kaufman@polya.Stanford.EDU (Marc T. Kaufman) Newsgroups: comp.sys.mac.programmer Subject: Re: Missing megabytes Message-ID: <7550@polya.Stanford.EDU> Date: 9 Mar 89 17:48:16 GMT References: <457@sys.uea.ac.uk> Sender: Marc T. Kaufman Reply-To: kaufman@polya.Stanford.EDU (Marc T. Kaufman) Organization: Stanford University Lines: 18 In article <457@sys.uea.ac.uk> jrk@s1.UUCP (Richard Kennaway) writes: >I am writing a program which, among other things, makes a directory >listing of a volume. There is a strange discrepancy in the >information it collects. >When it scans through all the files and folders with PBHGetCatInfo >in the usual way, it always finds exactly the right number of files and >folders, but the sum of their sizes is sometimes less than the >calculated number of used blocks. You should be aware that disk space is allocated in "Clumps" of size ioVClpSiz, where the clump size is chosen so that [disk size / clump size] < 65535, which is the maximum number of allocation blocks that the file system can handle. In addition, there is overhead for the allocation block bit map and the allocation and directory B-trees, which will not be reflected in the simple summation of file sizes. Marc Kaufman (kaufman@polya.stanford.edu)