PageItemProxy & MemoryMapped::operator[](uint64_t index) { if (index > m_FileSize) { throw std::exception("Out of file"); } PageIndex page = indexToPage(index); if (page == InvalidPage) { map(index); page = indexToPage(index); if (page == InvalidPage) { throw std::exception("Internal error"); } } touchPage(page); return m_Pages[page].absolute(index); }
void PagePool::resetPage (Page *page) { touchPage (page); }