| 244 | } |
| 245 | |
| 246 | void OverflowFile::writePageToDisk(page_idx_t pageIdx, uint8_t* data, bool newPage) const { |
| 247 | if (newPage) { |
| 248 | DASSERT(fileHandle); |
| 249 | DASSERT(!fileHandle->isInMemoryMode()); |
| 250 | fileHandle->writePageToFile(data, pageIdx); |
| 251 | } else { |
| 252 | DASSERT(shadowFile); |
| 253 | ShadowUtils::updatePage(*fileHandle, pageIdx, true /* overwriting entire page*/, |
| 254 | *shadowFile, [&](auto* frame) { memcpy(frame, data, LBUG_PAGE_SIZE); }); |
| 255 | } |
| 256 | } |
| 257 | |
| 258 | void OverflowFile::checkpoint(PageAllocator& pageAllocator) { |
| 259 | DASSERT(fileHandle); |
no test coverage detected