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

Function debugFileIsSet

fdbrpc/TraceFileIO.cpp:58–64  ·  view source on GitHub ↗

Checks if a block of memory has been written

Source from the content-addressed store, hash-verified

56
57// Checks if a block of memory has been written
58bool debugFileIsSet(uint8_t* storeMask, int64_t offset, int64_t length) {
59 for (int64_t i = 0; i < length; i += 4096)
60 if (memcmp(&storeMask[offset + i], debugFileSetPage, std::min((int64_t)4096, length - i)))
61 return false;
62
63 return true;
64}
65
66// Checks that a given block of data is the same as what has been written by a call to debugFileSet
67void debugFileCheck(std::string context, std::string file, const void* data, int64_t offset, int length) {

Callers 1

debugFileCheckFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected