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

Method resize

src/storage/disk_array.cpp:144–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142}
143
144uint64_t DiskArrayInternal::resize(PageAllocator& pageAllocator, const Transaction* transaction,
145 uint64_t newNumElements, std::span<std::byte> defaultVal) {
146 std::unique_lock xLck{diskArraySharedMtx};
147 auto it = iter_mut(defaultVal.size());
148 auto originalNumElements = getNumElementsNoLock(transaction->getType());
149 while (it.size() < newNumElements) {
150 it.pushBack(pageAllocator, transaction, defaultVal);
151 }
152 return originalNumElements;
153}
154
155void DiskArrayInternal::setNextPIPPageIDxOfPIPNoLock(uint64_t pipIdxOfPreviousPIP,
156 page_idx_t nextPIPPageIdx) {

Calls 5

pushBackMethod · 0.80
emplace_backMethod · 0.80
allocateBufferMethod · 0.80
sizeMethod · 0.45
getTypeMethod · 0.45

Tested by

no test coverage detected