MCPcopy Create free account
hub / github.com/apple/foundationdb / getUniqueBlocks

Method getUniqueBlocks

flow/Arena.cpp:239–258  ·  view source on GitHub ↗

just for debugging:

Source from the content-addressed store, hash-verified

237
238// just for debugging:
239void ArenaBlock::getUniqueBlocks(std::set<ArenaBlock*>& a) {
240 a.insert(this);
241 if (isTiny())
242 return;
243
244 int o = nextBlockOffset;
245 while (o) {
246 ArenaBlockRef* r = (ArenaBlockRef*)((char*)getData() + o);
247 makeDefined(r, sizeof(ArenaBlockRef));
248
249 // If next is valid recursively count its blocks
250 if (r->aligned4kBufferSize == 0) {
251 r->next->getUniqueBlocks(a);
252 }
253
254 o = r->nextBlockOffset;
255 makeNoAccess(r, sizeof(ArenaBlockRef));
256 }
257 return;
258}
259
260int ArenaBlock::addUsed(int bytes) {
261 if (isTiny()) {

Callers

nothing calls this directly

Calls 3

makeDefinedFunction · 0.85
makeNoAccessFunction · 0.85
insertMethod · 0.45

Tested by

no test coverage detected