Important: The information in this document is obsolete and should not be used for new development.
Allocating File Blocks
The File Manager provides two functions,Allocate
andAllocContig
, that allow you to allocate additional blocks to a file. The File Manager automatically allocates file blocks if you move the logical end-of-file past the physical end-of-file, and it automatically deallocates unneeded blocks from a file if you move the logical end-of-file to a position more than one allocation block before the current physical end-of-file. Consequently,
you do not in general need to be concerned with allocating or deallocating file
blocks. However, you can improve file block contiguity if you use theAllocate
orAllocContig
function to preallocate file blocks. This is most useful if you know
in advance how big a file is likely to become.
The
- Note
- When the File Manager allocates (or deallocates) file blocks automatically, it always adds (or removes) blocks in clumps. The
Allocate
andAllocContig
functions allow you to add blocks
in allocation blocks, which may be smaller than clumps.Allocate
andAllocContig
functions are not supported by AppleShare volumes. Instead, useSetEOF
orPBSetEOF
to extend a file by setting the end-of-file.
Subtopics
- Allocate
- AllocContig