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

Method zeroRange

fdbrpc/AsyncFileEncrypted.actor.cpp:134–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132 }
133
134 ACTOR static Future<Void> zeroRange(AsyncFileEncrypted* self, int64_t offset, int64_t length) {
135 ASSERT(self->mode == AsyncFileEncrypted::Mode::APPEND_ONLY);
136 // TODO: Could optimize this
137 Arena arena;
138 auto zeroes = new (arena) unsigned char[length];
139 memset(zeroes, 0, length);
140 wait(uncancellable(holdWhile(arena, self->write(zeroes, length, offset))));
141 return Void();
142 }
143};
144
145AsyncFileEncrypted::AsyncFileEncrypted(Reference<IAsyncFile> file, Mode mode)

Callers

nothing calls this directly

Calls 3

writeMethod · 0.95
uncancellableFunction · 0.85
VoidClass · 0.70

Tested by

no test coverage detected