MCPcopy Create free account
hub / github.com/Snapchat/Valdi / makeReadOnly

Method makeReadOnly

valdi/src/valdi/runtime/Resources/MmapBuffer.cpp:125–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123}
124
125Result<Void> MmapBuffer::makeReadOnly() {
126 if (mprotect(_addr, _size, PROT_READ) != 0) {
127 return Error(STRING_FORMAT("mprotect failed: {}", strerror(errno)));
128 }
129
130 return Void();
131}
132
133} // namespace Valdi

Callers 2

TESTFunction · 0.80
decompressToMmapMethod · 0.80

Calls 2

ErrorInterface · 0.50
VoidClass · 0.50

Tested by 1

TESTFunction · 0.64