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

Method clearReserve

fdbserver/DiskQueue.actor.cpp:63–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61 reserved = 0;
62 }
63 void clearReserve(int size) {
64 str = Standalone<StringRef>();
65 reserved = size;
66 str.contents() = StringRef(new (str.arena()) uint8_t[size], 0);
67 }
68 void append(StringRef x) { memcpy(append(x.size()), x.begin(), x.size()); }
69 void* append(int bytes) {
70 ASSERT(str.size() + bytes <= reserved);

Callers 1

readNextMethod · 0.80

Calls 1

StringRefClass · 0.50

Tested by

no test coverage detected