---------------------------------------------------------------------
CLASS: SpaceBitmapMap --DVM
PUBLIC METHODS:
SpaceBitmapMap() - Constructor which requires a
SpaceBitmapDesc, the block number where
it is located in the partition, and the
block size of the medium.
blockSize() - Returns the logical block size of the
partition (specified in the
constructor).
startBlock() - Returns the logical block address of the
first block of the bitmap (specified in
the constructor).
startByteOffset() - Returns the byte offset to the start of
the actual bitmap data (accounts for the
header image).
blockStartByteOffset() - Returns the byte offset to the start of
the actual bitmap data in the specified
block (value is zero except for the first
block).
numBits() - Returns the number of bits in the bitmap
data.
bitComponent() - Static function that returns only the bit
residue in the final byte of a given bit
offset.
byteComponent() - Static function that returns the number
of COMPLETE bytes represented by a given
bit offset.
bitNumber() - Static function that translates a byte
offset into a bit offset.
bitNumber() - Static function that translates a byte
offset and bit residue into a single bit
offset.
maskBit() - Static function that generates a mask
byte to extract a specified bit.
maskBits() - Static function that generates a mask
byte to extract a specified range of bits.
blockAbsToRel() - Converts a logical block number to a block
offset relative to the start of the bitmap.
blockRelToAbs() - Converts a block number relative to the
start of the bitmap to an absolute
logical block number.
maxExtentBlocks() - Returns the maximum number of blocks a
logical extent may contain.
bytesToBlocks() - Returns the number of logical blocks
needed to contain the specified number of
bytes.
blocksToBytes() - Returns the total number of bytes
represented by the specified number of
logical blocks.
blockNum() - Returns the relative offset to the block
containing the specified bit address.
blockBitOffset() - Returns the residule bit offset within a
logical block of a specified bit address.
blockBitAddr() - Returns the bit address of a specified
bit offset within a specified block.
USAGE NOTES:
This is to be used AFTER using the SpaceBitmapDesc, in order to
access individual bits in the SpaceBitmap. It merely provides
information about where bits are located, and leaves the task of
reading and writing individual pages of the bitmap up to the user.
It supports arbitrary-sized paging of bitmaps, by supporting an
optional BlockNum in the byteOffset() method.
Once it is constructed, the SpaceBitmapDesc passed in may be
destroyed, since this object contains neither a pointer nor a
reference to it, but rather extracts all the information it needs
at that time.
NOTE that the first block of the SpaceBitmap contains the
SpaceBitmapDesc (at its beginning). Also NOTE that this class
takes that descriptor's presence into account, so that it will
NEVER return values allowing the SpaceBitmapDesc to be
modified. Therefore, if only the addresses returned by this class
are used for modifying bits, the first block in the bitmap area
may be read/modified/written with no risk to the SpaceBitmapDesc
becoming corrupted. Thus, the user may view this as presenting the
entire SpaceBitmap area as ONLY a bitmap which may be easily paged
in and out to disk.
----------------------------------------------------------------------