int capacity() const {return capacity_;}
/// return the number of used slots in the FileMap
- int numFilesInMap() const {return used_slots_;}
+ int numFilesInMap() const {return usedSlots_;}
private:
/// grow the FileMap (size is doubled each time, up to 2^24 bits)
void grow();
/// max number of files which can be tracked in the current store
sfileno capacity_;
/// used slots in the map
- unsigned int used_slots_;
+ unsigned int usedSlots_;
/// number of "long ints" making up the filemap
unsigned int nwords;
unsigned long *bitmap;
#define FM_INITIAL_NUMBER (1<<14)
FileMap::FileMap() :
- capacity_(FM_INITIAL_NUMBER), used_slots_(0),
+ capacity_(FM_INITIAL_NUMBER), usedSlots_(0),
nwords(capacity_ >> LONG_BIT_SHIFT)
{
debugs(8, 3, HERE << "creating space for " << capacity_ << " files");
bitmap[file_number >> LONG_BIT_SHIFT] |= bitmask;
- used_slots_++;
+ usedSlots_++;
return file_number;
}
{
unsigned long bitmask = (1L << (file_number & LONG_BIT_MASK));
bitmap[file_number >> LONG_BIT_SHIFT] &= ~bitmask;
- used_slots_--;
+ usedSlots_--;
}
bool