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

Function addVersionStampAtEnd

flow/flow.cpp:321–328  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

319}
320
321StringRef addVersionStampAtEnd(StringRef const& str, Arena& arena) {
322 int32_t size = str.size();
323 uint8_t* s = new (arena) uint8_t[size + 14];
324 memcpy(s, str.begin(), size);
325 memset(&s[size], 0, 10);
326 memcpy(&s[size + 10], &size, 4);
327 return StringRef(s, size + 14);
328}
329
330Standalone<StringRef> addVersionStampAtEnd(StringRef const& str) {
331 Standalone<StringRef> r;

Callers 5

applyChangesMethod · 0.85
serverTagHistoryKeyForFunction · 0.85
blobGranuleSplitValueForFunction · 0.85
blobGranuleMergeValueForFunction · 0.85

Calls 4

memcpyFunction · 0.85
StringRefClass · 0.50
sizeMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected