MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / resetToZeroPagesAndPageCapacity

Method resetToZeroPagesAndPageCapacity

src/storage/file_handle.cpp:114–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112}
113
114void FileHandle::resetToZeroPagesAndPageCapacity() {
115 removePageIdxAndTruncateIfNecessary(0 /* pageIdx */);
116 if (isInMemoryMode()) {
117 for (auto i = 0u; i < numPages; i++) {
118 bm->unpin(*this, i);
119 }
120 } else {
121 fileInfo->truncate(0 /* size */);
122 }
123}
124
125uint8_t* FileHandle::getFrame(page_idx_t pageIdx) {
126 DASSERT(pageIdx < numPages);

Callers 1

clearMethod · 0.80

Calls 2

unpinMethod · 0.45
truncateMethod · 0.45

Tested by

no test coverage detected