|bool||setBit (sfileno num)|
|bool||testBit (sfileno num) const|
|Test whether the num-th bit in the FileMap is set. More...|
|void||clearBit (sfileno num)|
|sfileno||allocate (sfileno suggestion)|
|int||capacity () const|
|return the max number of slots in the FileMap More...|
|int||numFilesInMap () const|
|return the number of used slots in the FileMap More...|
|grow the FileMap (size is doubled each time, up to 2^24 bits) More...|
|FileMap (const FileMap &)|
|FileMap &||operator= (const FileMap &)|
|max number of files which can be tracked in the current store More...|
|used slots in the map More...|
|number of "long ints" making up the filemap More...|
|unsigned long *||bitmap|
A bitmap used for managing UFS StoreEntry "file numbers".
Nth bit represents whether file number N is used. The map automatically grows to hold up to 2^24 bits. New bit is "off" or zero by default, representing unused fileno. TODO: consider using std::bitset instead.
Constructor & Destructor Documentation
Member Function Documentation
locate an unused slot in the FileMap, possibly at or after position suggestion
Obtain the location of an unused slot in the FileMap, growing it if needed. The suggestion is only an advice; there is no guarantee that it will be followed.
Clear the num-th bit in the FileMap
- that clearBit doesn't do any bounds checking, nor it checks that the bit is set before clearing. The caller will have to ensure that both are true using testBit before clearing.
Set the num-th bit in the FileMap
- FileMap's backing storage will be extended as needed to hold the representation, but if the bit is already set it will break the file number accounting, so the caller must ensure that setBit is only called if the bit is not already set, by using testBit on it before.
Member Data Documentation
The documentation for this class was generated from the following files: