delete map; // we just wanted to initialize shared memory segments
}
-MemStore::MemStore(): map(NULL), cur_size(0)
+MemStore::MemStore(): map(NULL), theCurrentSize(0)
{
}
uint64_t
MemStore::currentSize() const
{
- return cur_size >> 10;
+ return theCurrentSize >> 10;
}
uint64_t
debugs(20, 7, HERE << "mem-cached all " << eSize << " bytes of " << e <<
" in " << page);
- cur_size += eSize;
+ theCurrentSize += Ipc::Mem::PageSize();
// remember storage location and size
extras.page = page;
extras.storedSize = copied;
MemStore::cleanReadable(const sfileno fileno)
{
Ipc::Mem::PutPage(map->extras(fileno).page);
- cur_size -= map->extras(fileno).storedSize;
+ theCurrentSize -= Ipc::Mem::PageSize();
}
/// calculates maximum number of entries we need to store and map
private:
MemStoreMap *map; ///< index of mem-cached entries
- uint64_t cur_size; ///< currently used space in the storage area
+ uint64_t theCurrentSize; ///< currently used space in the storage area
};
// Why use Store as a base? MemStore and SwapDir are both "caches".