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

Method readFromBuffer

fdbserver/DiskQueue.actor.cpp:1326–1337  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1324 }
1325
1326 void readFromBuffer(StringBuffer* result, int* bytes) {
1327 // extract up to bytes from readBufPage into result
1328 int len = std::min(readBufPage->payloadSize - readBufPos, *bytes);
1329 if (len <= 0)
1330 return;
1331
1332 result->append(StringRef(readBufPage->payload + readBufPos, len));
1333
1334 readBufPos += len;
1335 *bytes -= len;
1336 nextReadLocation += len;
1337 }
1338
1339 ACTOR static Future<Standalone<StringRef>> readNext(DiskQueue* self, int bytes) {
1340 state StringBuffer result(self->dbgid);

Callers 1

readNextMethod · 0.95

Calls 2

StringRefClass · 0.50
appendMethod · 0.45

Tested by

no test coverage detected