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

Function makePadding

fdbclient/FileBackupAgent.actor.cpp:451–459  ·  view source on GitHub ↗

Return a block of contiguous padding bytes, growing if needed.

Source from the content-addressed store, hash-verified

449
450// Return a block of contiguous padding bytes, growing if needed.
451Value makePadding(int size) {
452 static Value pad;
453 if (pad.size() < size) {
454 pad = makeString(size);
455 memset(mutateString(pad), '\xff', pad.size());
456 }
457
458 return pad.substr(0, size);
459}
460
461// File Format handlers.
462// Both Range and Log formats are designed to be readable starting at any 1MB boundary

Callers 5

writeKV_implMethod · 0.85
newBlockMethod · 0.85
writeKV_implMethod · 0.85

Calls 4

makeStringFunction · 0.85
mutateStringFunction · 0.85
substrMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected